CWD=`pwd` PKG=/tmp/package-pan rm -rf $PKG mkdir -p $PKG/usr VERSION=0.14.2.91 ARCH=${ARCH:-i486} BUILD=${BUILD:-2} if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" fi cd /tmp tar xjvf $CWD/pan-$VERSION.tar.bz2 cd pan-$VERSION chown -R root:root . find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 600 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; find . -perm 400 -exec chmod 644 {} \; find . -perm 440 -exec chmod 644 {} \; find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --localstatedir=/var/lib \ --enable-html \ $ARCH-slackware-linux make -j3 make install DESTDIR=$PKG # Fix the .desktop, and put it in the standard place: mkdir -p $PKG/usr/share/applications zcat $CWD/pan.desktop.gz > $PKG/usr/share/applications/pan.desktop rm -rf $PKG/usr/share/gnome ( 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 ) mkdir -p $PKG/usr/doc/pan-$VERSION cp -a \ ANNOUNCE.html AUTHORS COPYING CREDITS NEWS README TODO \ $PKG/usr/doc/pan-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd /tmp/package-pan makepkg -l y -c n ../pan-$VERSION-$ARCH-$BUILD.tgz