#!/bin/bash #*********************************************************************** # Heavily based on the Slackware 12.1 SlackBuild * # Copyright 1892-2008, ilgufo [at] gmail [dot] com * # * # Redistribution and use of this script, with or without modification * # is permitted provided that the following conditions are met: * # * # 1. Redistributions of this script must retain the above copyright * # notice, and this list of conditions * # * #*********************************************************************** PACKAGE=postgrey VERSION=1.32 TMP=/tmp/tgz ARCH=noarch VER=1gufo CWD=$PWD TMPDIR=$TMP/$PACKAGE-$VERSION-build cd $TMP tar zxvf "$CWD"/$PACKAGE-$VERSION.tar.gz cd $PACKAGE-$VERSION chown -R root:root . mkdir -p $TMPDIR{/usr/bin/,/etc/rc.d/,/etc/postfix/,/usr/doc/$PACKAGE-$VERSION,/var/spool/postfix/postgrey/} cp postgrey contrib/postgreyreport $TMPDIR/usr/bin/ cp README* Changes COPYING $TMPDIR/usr/doc/$PACKAGE-$VERSION cp postgrey_whitelist_clients $TMPDIR/etc/postfix/postgrey_whitelist_clients.new cp postgrey_whitelist_recipients $TMPDIR/etc/postfix/postgrey_whitelist_recipients.new zcat "$CWD"/rc.postgrey.gz > $TMPDIR/etc/rc.d/rc.postgrey.new mkdir -p $TMPDIR/install cat "$CWD"/slack-desc > $TMPDIR/install/slack-desc zcat "$CWD"/doinst.sh.gz > $TMPDIR/install/doinst.sh cat "$CWD"/slack-desc > $TMPDIR/usr/doc/$PACKAGE-$VERSION/slack-desc cat "$CWD"/postgrey.SlackBuild > $TMPDIR/usr/doc/$PACKAGE-$VERSION/postgrey.SlackBuild cd $TMPDIR requiredbuilder -v -y -s $CWD $PKG makepkg -l y -c n $PACKAGE-$VERSION-$ARCH-$VER.tgz . cp $PACKAGE-$VERSION-$ARCH-$VER.tgz "$CWD" rm -r $TMPDIR $TMP/$PACKAGE-$VERSION