aboutsummaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-12-05 23:54:17 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-12-05 23:54:17 +0000
commit440af6827aeaf9236855e2a42f30915fe0c20081 (patch)
tree1c029796af7fd04bcbb8a2bcef65243a4c8d9b6d /mail
parent26b17bdabd1afef79e0c4f7e1718ed4e63db54c8 (diff)
downloadslackbuilds-440af6827aeaf9236855e2a42f30915fe0c20081.tar.gz
slackbuilds-440af6827aeaf9236855e2a42f30915fe0c20081.tar.bz2
postgrey update
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@899 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'mail')
-rwxr-xr-xmail/filter/postgrey/postgrey.SlackBuild34
-rw-r--r--mail/filter/postgrey/slack-required4
2 files changed, 25 insertions, 13 deletions
diff --git a/mail/filter/postgrey/postgrey.SlackBuild b/mail/filter/postgrey/postgrey.SlackBuild
index 5d8e46ec..a7e5fab8 100755
--- a/mail/filter/postgrey/postgrey.SlackBuild
+++ b/mail/filter/postgrey/postgrey.SlackBuild
@@ -2,10 +2,18 @@
#
# slackbuild script for mod_fastcgi
#
-# you'll need the following perl modules to run postgrey:
-#
-# cpan2tgz --install Net::Server IO::Multiplex BerkeleyDB Digest::SHA1
-#
+
+if [ -s "slack-required" ]; then
+ echo Recomended and required packages for building postgrey are:
+ cat slack-required | sed -e 's/^/\t/'
+ if [ "$INTERACT" != "no" ]; then
+ echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
+ read crap
+# else
+# echo Sleeping 3 seconds...
+# sleep 3
+ fi
+fi
CWD="`pwd`"
@@ -24,22 +32,22 @@ TMP=${TMP:=/tmp}
SRC_DIR=${SRC:=$CWD}
REPOS=${REPOS:=$TMP}
+# ------- error codes for createpkg --------------
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40
+
RTOOL="wget"
PACKAGE_EXT="gz"
SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
URL="http://isg.ee.ethz.ch/tools/postgrey/pub/$SRC"
-if [ "$PACKAGE_EXT" == "bz2" ]; then
- tarflag="j"
-else
- tarflag="z"
-fi
-
SRC_DIR="$SRC_DIR/$PACKAGE"
mkdir -p $SRC_DIR
if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
- wget "$URL" -O "$SRC_DIR/$SRC"
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
TMP="$TMP/$PACKAGE"
@@ -47,7 +55,7 @@ rm -rf $TMP
mkdir -p $TMP
cd $TMP
-tar xvf$tarflag $SRC_DIR/$SRC
+tar xvf $SRC_DIR/$SRC || exit $ERROR_TAR
cd $PACKAGE-$VERSION
CWD="`pwd`"
@@ -99,7 +107,7 @@ done
echo '( if [ ! -f "etc/postfix/postgrey_whitelist_recipients" ]; then mv etc/postfix/postgrey_whitelist_recipients.new etc/postfix/postgrey_whitelist_recipients; fi )' > install/doinst.sh
echo '( if [ ! -f "etc/postfix/postgrey_whitelist_clients" ]; then mv etc/postfix/postgrey_whitelist_clients.new etc/postfix/postgrey_whitelist_clients; fi )' >> install/doinst.sh
-makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
+makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG
if [ "$CLEANUP" == "yes" ]; then
rm -rf $TMP
diff --git a/mail/filter/postgrey/slack-required b/mail/filter/postgrey/slack-required
new file mode 100644
index 00000000..92a0d048
--- /dev/null
+++ b/mail/filter/postgrey/slack-required
@@ -0,0 +1,4 @@
+perl-net-server
+perl-io-multiplex
+perl-berkeleydb
+perl-digest-sha1