#!/bin/sh # Heavily based on the Slackware 11.0 SlackBuild # http://www.xfce.org/index.php # Copyright 2003 Slackware Linux, Inc., Concord, CA, USA # Copyright 2007 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # dependecies: dbus, dbus-glib, hal, uri, vte, intltool # mod by submax NAME=xfce VERSION=4.4.1 ARCH=${ARCH:-i686} TMP=${TMP:-/tmp/tgz} PKG=$TMP/package-$NAME CWD=$(pwd) BUILD=8sm SOURCE=http://switch.dl.sourceforge.net/sourceforge/$NAME/$NAME-$VERSION-src.tar.bz2 #The Thunar Volume Manager is an extension for the Thunar file manager, which enables automatic management of removable drives and media. #For example, if thunar-volman is installed and configured properly, and you plug in your digital camera, it will automatically launch #your preferred photo application and import the new pictures from the camera into your photo collection. VERSION_VOLMAN=0.1.2 SOURCE_VOLMAN=http://download.berlios.de/xfce-goodies/thunar-volman-$VERSION_VOLMAN.tar.bz2 if [ ! -e $NAME-$VERSION-src.tar.bz2 ]; then wget -c $SOURCE fi if [ ! -e thunar-volman-$VERSION_VOLMAN.tar.bz2 ]; then wget -c $SOURCE_VOLMAN fi rm -rf $TMP mkdir -p $TMP if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O3 -march=i686 -pipe -fomit-frame-pointer" elif [ "$ARCH" = "athlon64" ]; then SLKCFLAGS="-O2 -march=athlon64 -pipe" elif [ "$ARCH" = "athlonxp" ]; then SLKCFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" fi #decompress sources cd $TMP tar xjvf $CWD/$NAME-$VERSION-src.tar.bz2 || exit 1 cd $NAME-$VERSION/src #test checksum md5sum -c $NAME-$VERSION.md5 if [ $? != 0 ];then echo "checksum sources error" exit 2 fi for file in $(ls *.tar.bz2) do tar xjf $file || exit 1 done #decompress external package volman cp $CWD/thunar-volman-$VERSION_VOLMAN.tar.bz2 . tar xjvf ./thunar-volman-$VERSION_VOLMAN.tar.bz2 || exit 1 # change permissions chown -R root:root . find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; ## compile ## #IMP http://www.xfce.org/documentation/requirements LIST_SOURCES_ORDERED="xfce4-dev-tools \ libxfce4util \ libxfcegui4 \ libxfce4mcs \ xfce-mcs-manager \ exo \ xfce-mcs-plugins \ xfce4-panel \ Thunar \ xfce4-session \ xfwm4 \ xfdesktop \ xfce-utils \ xfprint \ gtk-xfce-engine \ mousepad \ Terminal \ xfce4-appfinder \ xfce4-mixer \ xfce4-icon-theme \ xfwm4-themes \ orage \ thunar-volman" #add external for package in $LIST_SOURCES_ORDERED do ( file="$(ls | egrep "^$package\-([0-9]+)\.([0-9]+)\.([0-9]*)\.tar\.bz2$")" if [ -z "$file" ];then echo "package \"$package\" not find" exit 4 fi package_dir=$(basename $file .tar.bz2) cd $package_dir echo echo "Compile package \"$package_dir\" start..." echo # fix: *** glibc detected *** corrupted double-linked list: 0x0e360c20 *** # new versions of glibc added checks for code sanity at execution, which make things that used to work now crash. # I know the malloc check could be disabled with adding follow line export MALLOC_CHECK_=0 # fix for xfce4-session checking iceauth export ICEAUTH="/usr/X11R6/bin/iceauth" if [ "$package" = "xfce-utils" ]; then cat scripts/startxfce4.in | sed "s/usr\/local\/share/\/usr\/local\/share/g" > scripts/startxfce4.in fi # This option produces no difference that I can see # --disable-hal CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr \ --mandir=/usr/man \ --sysconfdir=/etc/X11 \ --enable-compositor \ --enable-static=no \ --enable-xinerama \ --enable-debug=no \ --with-sound=alsa \ --enable-final \ --build=$ARCH-slackware-linux # I had a few things blow up with # -j > 1... make -j1 # -j1 fix problem xfce4-mixer 4.4.1 with "libtool: link: cannot find the library # `libxfce4mixer.la' or unhandled argument `libxfce4mixer.la'" # Parallel make failure in 4.4.1, "-j2" or higher is broken, needs some love :) if [ $? != 0 ]; then echo "[ERROR] make [ERROR]" echo echo "Compile package \"$package_dir\": FAIL." echo exit 3 fi echo echo "Compile package \"$package_dir\": DONE." echo make install make install DESTDIR=$PKG mkdir -p $PKG/usr/doc/$package_dir # This will cause errors, but won't miss any docs: cp -a \ AUTHORS BUGS COMPOSITOR COPYING COPYING.LIB COPYING_LIBS FAQ HACKING INSTALL NEWS \ NOTES README README.Kiosk README.Plugins THANKS TODO example.gtkrc-2.0 \ $PKG/usr/doc/$package_dir 2> /dev/null exit 0 ) if [ $? != 0 ]; then exit; fi done # strip exe file and compress man pages ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null for mandir in `find . -name man -type d` ; do if [ -d $mandir ]; then ( cd $mandir find . -type f -name "*.?" -exec gzip -9 {} \; ) fi done ) #cicle for uninstall packages temp installed for compilation for file in $(ls *.tar.bz2) do ( cd $(basename $file .tar.bz2) make uninstall ) done # fix xfdesktop italian language bug mv $PKG/etc/X11/xdg/xfce4/desktop/xfce-registered-categories.xml.it \ $PKG/etc/X11/xdg/xfce4/desktop/xfce-registered-categories.xml.ita # fix xinitrc mkdir -p $PKG/etc/X11/xinit cp $PKG/etc/X11/xdg/xfce4/xinitrc $PKG/etc/X11/xinit/xinitrc.xfce chmod 755 $PKG/etc/X11/xdg/xfce4/xinitrc chmod 755 $PKG/etc/X11/xinit/xinitrc.xfce # Add src inside package mkdir -p $PKG/usr/doc/$NAME-$VERSION/src/ cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/src/slack-desc cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/src/$NAME.SlackBuild (cd $PKG/usr/doc/$NAME-$VERSION/; tar -cvzf src.tar.gz src/) rm -rf $PKG/usr/doc/$NAME-$VERSION/src/ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG requiredbuilder -v -y -s $CWD $PKG makepkg -l y -c n $CWD/../$NAME-$VERSION-$ARCH-$BUILD.tgz (cd $CWD/.. md5sum $NAME-$VERSION-$ARCH-$BUILD.tgz > $NAME-$VERSION-$ARCH-$BUILD.tgz.md5 cat $PKG/install/slack-desc | grep "^$NAME" > $NAME-$VERSION-$ARCH-$BUILD.txt ) if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi