#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-procmail VERSION=3.22 ARCH=${ARCH:-i486} BUILD=${BUILD:-2} rm -rf $PKG mkdir -p $PKG # Explode the package framework: cd $PKG explodepkg $CWD/_procmail.tar.gz cd $TMP rm -rf procmail-$VERSION tar xzvf $CWD/procmail-$VERSION.tar.gz cd procmail-$VERSION zcat $CWD/procmail_3.22-5.diff.gz | patch -p1 --verbose || exit zcat $CWD/procmail.lfs.diff.gz | patch -p1 --verbose || exit chown -R root:root . find . -perm 777 -exec chmod 755 {} \; find . -perm 664 -exec chmod 644 {} \; make cd src cat formail > $PKG/usr/bin/formail cat lockfile > $PKG/usr/bin/lockfile cat mailstat > $PKG/usr/bin/mailstat cat procmail > $PKG/usr/bin/procmail cd ../man for file in formail.1 lockfile.1 procmail.1 ; do gzip -9c $file > $PKG/usr/man/man1/$file.gz done for file in procmailex.5 procmailrc.5 procmailsc.5 ; do gzip -9c $file > $PKG/usr/man/man5/$file.gz done mkdir -p $PKG/usr/doc/procmail-$VERSION cd .. cp -a \ Artistic COPYING FAQ FEATURES HISTORY INSTALL KNOWN_BUGS \ README examples $PKG/usr/doc/procmail-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc ( 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 ) # Build the package: cd $PKG makepkg -l y -c n $TMP/procmail-$VERSION-$ARCH-$BUILD.tgz