#!/bin/sh # Heavily based on the Slackware 11.0 SlackBuild # http://www.hylafax.org # Packagers Andrea Sciucca Gohanz ( gohanz@infinito.it) # http://www.slacky.it CWD=`pwd` if ["$TMP" = ""]; then TMP=/tmp fi PKG=$TMP/package-hylafax NAME=hylafax VERSION=5.1.5 ARCH=${ARCH:-i686} BUILD=1as if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi cd $TMP tar xvzf $CWD/$NAME-$VERSION.tar.gz echo "+------------------------------------+" echo "| Starting SlackBuild $NAME-$VERSION |" echo "+------------------------------------+" cd $NAME-$VERSION cp -a $CWD/config.cache . find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; ./configure make mkdir -p $PKG/etc/rc.d mkdir -p $PKG/etc/cron.daily mkdir -p $PKG/etc/cron.hourly mkdir -p $PKG/etc/logrotate.d mkdir -p $PKG/usr/lib/fax mkdir -p $PKG/usr/bin mkdir -p $PKG/usr/sbin mkdir -p $PKG/usr/man/man1 mkdir -p $PKG/usr/man/man5 mkdir -p $PKG/usr/man/man8 mkdir -p $PKG/var/spool/hylafax make install install -m 755 $CWD/hylafax.cron.daily $PKG/etc/cron.daily/hylafax install -m 755 $CWD/hylafax.cron.hourly $PKG/etc/cron.hourly/hylafax install -m 644 $CWD/hylafax.logrotate $PKG/etc/logrotate.d/hylafax cp $TMP/$NAME-$VERSION/faxalter/faxalter $PKG/usr/bin cp $TMP/$NAME-$VERSION/faxcover/faxcover $PKG/usr/bin cp $TMP/$NAME-$VERSION/faxmail/faxmail $PKG/usr/bin cp $TMP/$NAME-$VERSION/faxrm/faxrm $PKG/usr/bin cp $TMP/$NAME-$VERSION/faxstat/faxstat $PKG/usr/bin cp $TMP/$NAME-$VERSION/sendfax/sendfax $PKG/usr/bin cp $TMP/$NAME-$VERSION/sendpage/sendpage $PKG/usr/bin find . -perm -755 -exec cp {} /$PKG/usr/sbin \; ( cd $PKG/usr/sbin rm config* lib* hylafax.in mkdepend.in mkhash mailfax* sendpage sendfax faxstat faxrm faxmail faxcover faxalter ) cp -a /usr/sbin/edit-faxcover $PKG/usr/sbin cp -a /usr/sbin/faxabort $PKG/usr/sbin cp -a /usr/sbin/faxaddmodem $PKG/usr/sbin cp -a /usr/sbin/faxanswer $PKG/usr/sbin cp -a /usr/sbin/faxcron $PKG/usr/sbin cp -a /usr/sbin/faxlock $PKG/usr/sbin cp -a /usr/sbin/faxquit $PKG/usr/sbin cp -a /usr/sbin/faxsetup* $PKG/usr/sbin cp -a /usr/sbin/hylafax $PKG/usr/sbin cp -a /usr/sbin/probemodem $PKG/usr/sbin cp -a /usr/sbin/recvstats $PKG/usr/sbin cp -a /usr/sbin/xferfaxstats $PKG/usr/sbin cp -a -r /var/spool/hylafax/* $PKG/var/spool/hylafax cp -a $TMP/$NAME-$VERSION/etc/hylafax $PKG/etc/rc.d/rc.hylafax cp -a $TMP/$NAME-$VERSION/faxd/lib* $PKG/usr/lib cp -a $TMP/$NAME-$VERSION/util/lib* $PKG/usr/lib cp -a $TMP/$NAME-$VERSION/util/pagesizes $PKG/usr/lib/fax cp -a $TMP/$NAME-$VERSION/util/typerules $PKG/usr/lib/fax cp -a $TMP/$NAME-$VERSION/faxmail/faxmail.ps $PKG/usr/lib/fax cp -a $TMP/$NAME-$VERSION/faxcover/*.ps $PKG/usr/lib/fax cp -a $TMP/$NAME-$VERSION/hfaxd/hfaxd.conf $PKG/usr/lib/fax mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a CHANGES CONTRIBUTORS COPYRIGHT INSTALL README TODO VERSION \ $PKG/usr/doc/$NAME-$VERSION mv $PKG/var/spool/hylafax/COPYRIGHT $PKG/usr/doc/$NAME-$VERSION cp -a $CWD/README.Slackware $PKG/usr/doc/$NAME-$VERSION cd $CWD cp -a *.SlackBuild slack-desc $PKG/usr/doc/$NAME-$VERSION ( 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 find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs strip -g 2> /dev/null ) ( cd $PKG find -iname 'Makefile*' -exec rm -f {} \; ) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc gzip -9 $PKG/usr/man/*/* cd $PKG chown -R root:root . requiredbuilder -y -v -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$NAME-$VERSION rm -rf $PKG fi