CWD=`pwd` PKG=/tmp/package-pan rm -rf $PKG mkdir -p $PKG/usr VERSION=0.14.2.91 ARCH=x86_64 BUILD=2 NUMJOBS=15 # you probably want to change this 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 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 {} \; LDFLAGS=-L/usr/lib64 \ CFLAGS="-O2 -fPIC" \ ./configure --prefix=/usr \ --libdir=/usr/lib64 \ --localstatedir=/var/lib \ --enable-html \ $ARCH-slackware-linux make -j$NUMJOBS 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 chown -R root.bin $PKG/usr/bin ( cd $PKG find . | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded ) 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