#!/bin/sh CWD=`pwd` NAME=exim VERSION=4.43 ARCH=i586 BUILD=1 PKGNAME=$NAME PKGVER=$VERSION BASEDIR=$PKGNAME-$PKGVER ARCHIVE=$BASEDIR.tar.bz2 #FAQ=FAQ.txt.gz #SAMPLES=config.samples.tar.gz REPOSITORY=ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4 FLAGS="-O2 -march=pentium -mcpu=pentium -fno-strength-reduce \ -fomit-frame-pointer -ffast-math" PKG=/tmp/package-$NAME rm -rf $PKG mkdir -p $PKG # Obtain sources if [ ! -e $ARCHIVE ]; then if `wget "$REPOSITORY/$ARCHIVE"`; then true else exit 1 fi fi #if [ ! -e $FAQ ]; then # if `wget "$REPOSITORY/$FAQ"`; then # true # else # exit 1 # fi #fi #if [ ! -e $SAMPLES ]; then # if `wget "$REPOSITORY/$SAMPLES"`; then # true # else # exit 1 # fi #fi # Compile cd /tmp tar jxvf $CWD/$ARCHIVE cd $BASEDIR bzcat $CWD/$NAME-$VERSION-heimdal.patch.bz2 | patch -p1 -s make # Install make install DESTDIR=$PKG mkdir -p $PKG/install $PKG/usr/doc/$NAME-$VERSION $PKG/etc/rc.d \ $PKG/etc/logrotate.d $PKG/var/spool/exim $PKG/var/log/exim $PKG/usr/man/man8 cat > $PKG/install/slack-desc < $PKG/install/slack-required <= 0.9.7d-i486-1 EOF install -m644 -g0 -o0 doinst.sh $PKG/install # Documentation install -m444 -g0 -o0 doc/exim.8 $PKG/usr/man/man8 ( cd doc mv README README.doc rm -f exim.8 ) install -m644 -g0 -o0 ACKNOWLEDGMENTS LICENCE NOTICE README* \ doc/* $PKG/usr/doc/$NAME-$VERSION gzip -9nf \ $PKG/usr/doc/$NAME-$VERSION/ACKNOWLEDGMENTS \ $PKG/usr/doc/$NAME-$VERSION/README* \ $PKG/usr/doc/$NAME-$VERSION/LICENCE \ $PKG/usr/doc/$NAME-$VERSION/ChangeLog \ $PKG/usr/doc/$NAME-$VERSION/*.upgrade \ $PKG/usr/doc/$NAME-$VERSION/*.txt \ $PKG/usr/doc/$NAME-$VERSION/NewStuff # don't forget faq / samples! #install -m644 -g0 -o0 $CWD/$FAQ $PKG/usr/doc/$NAME-$VERSION #install -m644 -g0 -o0 $CWD/$SAMPLES $PKG/usr/doc/$NAME-$VERSION # End Documentation # Configuration install -m644 -g0 -o0 exim.logrotate $PKG/etc/logrotate.d/exim install -m644 -g0 -o0 rc.exim $PKG/etc/rc.d/rc.exim.new mv $PKG/etc/aliases $PKG/etc/aliases.sample mv $PKG/etc/mail/exim.conf $PKG/etc/mail/exim.conf.sample # End Configuration chmod 444 $PKG/usr/man/man?/*.? gzip -9nf $PKG/usr/man/man?/*.? strip $PKG/usr/sbin/* || : chown -R root.root $PKG chown mail.mail $PKG/var/spool/exim $PKG/var/log/exim chgrp bin $PKG/usr/sbin/* $PKG/usr/sbin # Make package cd $PKG cat install/slack-desc | grep "$NAME:" > /tmp/$NAME-$VERSION-$ARCH-$BUILD.txt makepkg -l y -c n /tmp/$NAME-$VERSION-$ARCH-$BUILD.tgz