#!/bin/bash # Packager : Jean-Philippe Guillemin # sources location : http://foo-projects.org/~elangelo/xfce-snapshots/ softversion='4.4.1' packageversion='46.2' softname='xfce-plugins' arch='i486' cpu='i686' buildir=$(pwd) package="$softname-$softversion-$arch-$packageversion" dest="$buildir/$package" rm -rf $dest rm -f $dest.tgz mkdir -p $dest cd $buildir sources="\ xfce4-battery-plugin-0.5.0.1.tar.gz \ xfce4-mailwatch-plugin-1.0.2.tar.gz \ xfce4-mount-plugin-0.5.1.tar.bz2 \ xfce4-fsguard-plugin-0.3.0.tar.gz \ xfce4-weather-plugin-0.6.0.tar.bz2 \ xfce4-netload-plugin-0.4.0.tar.bz2 \ xfce4-cpugraph-plugin-0.3.0.tar.gz \ xfce4-clipman-plugin-0.8.0.tar.bz2 \ xfce4-minicmd-plugin-0.4.0.tar.bz2 \ xfce4-wavelan-plugin-0.5.4.tar.gz \ xfce4-xkb-plugin-0.4.3.tar.bz2 \ xfce4-places-plugin-0.2.0.tar.bz2 \ xfce4-screenshooter-plugin-1.0.0.tar.bz2 xfce4-cpufreq-plugin-0.0.1.tar.gz" for file in $sources ; do echo -n "$file :" if [ -e $file ]; then echo " OK" else echo " missing !" exit 1 fi done for file in $sources ; do if [ "$(echo $file | grep ".tar.bz2" )" ]; then srcdir="$(basename $file .tar.bz2)" rm -rf $srcdir tar jxvf $file elif [ "$(echo $file | grep ".tar.gz" )" ]; then srcdir="$(basename $file .tar.gz)" rm -rf $srcdir tar zxvf $file fi ( cd $srcdir 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 {} \; export CFLAGS="-O2 -march=$arch -mtune=$cpu" export ICEAUTH='/usr/bin/iceauth' ./configure --prefix=/usr \ --mandir=/usr/man \ --sysconfdir=/etc/X11 \ --enable-static=no \ --enable-compositor \ --enable-xinerama \ --enable-final \ --enable-debug=no \ --disable-gtk-doc make || exit 1 # make install make install DESTDIR=$dest mkdir -p $dest/usr/doc/$srcdir cp -a \ AUTHORS COPYING INSTALL NEWS README TODO ChangeLog doc \ $dest/usr/doc/$srcdir # Striptease ( cd $dest 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 ) ) rm -rf $srcdir done cd $buildir # Panel plugins Zenwalk desktop integration mkdir -p $dest/usr/share/xfce4/panel-plugins cp -pf ./panel-plugins/* $dest/usr/share/xfce4/panel-plugins/ # redundant rm -rf $dest/usr/share/doc # slack-desc mkdir -p $dest/install cat > $dest/install/slack-desc << END xfce-plugins: xfce-plugins - plugins for the XFCE desktop xfce-plugins: xfce-plugins: XFce is a fast and lightweight desktop environment that is both xfce-plugins: sex-appealing and easy to use. xfce-plugins: For more information, see: http://www.xfce.org xfce-plugins: xfce-plugins: xfce-plugins: xfce-plugins: xfce-plugins: xfce-plugins: END mkdir -p $dest/usr/src/$softname-$softversion cp $buildir/build-$softname.sh $dest/usr/src/$softname-$softversion/ cd $dest makepkg -l y -c n $dest.tgz