From e5605c73e7b5c79bf696750f0191c538e63702c2 Mon Sep 17 00:00:00 2001 From: rhatto Date: Tue, 5 Dec 2006 22:19:11 +0000 Subject: courier-imap update git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@884 370017ae-e619-0410-ac65-c121f96126d4 --- net/mail/courier-imap/courier-imap.SlackBuild | 49 +++++++++++++++------------ net/mail/courier-imap/slack-required | 1 + 2 files changed, 28 insertions(+), 22 deletions(-) create mode 100644 net/mail/courier-imap/slack-required diff --git a/net/mail/courier-imap/courier-imap.SlackBuild b/net/mail/courier-imap/courier-imap.SlackBuild index 1e1679a8..cff8638d 100755 --- a/net/mail/courier-imap/courier-imap.SlackBuild +++ b/net/mail/courier-imap/courier-imap.SlackBuild @@ -1,14 +1,19 @@ #!/bin/bash # -# slackbuild script for clamav +# slackbuild script for courier-imap # -cat << EOCAT -You'll need to have following package installed: - - courier-authlib - -EOCAT +if [ -s "slack-required" ]; then + echo Recomended and required packages for building courier-imap 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 if [ "$INTERACT" != "no" ]; then echo "Hit ENTER do continue, Crtl-C to abort" @@ -35,6 +40,12 @@ 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 + if [ "`whoami`" == "root" ]; then echo This script should run as normal user. exit 1 @@ -56,22 +67,16 @@ URL="http://easynews.dl.sourceforge.net/sourceforge/courier/$SRC" SRC_DIR="$SRC_DIR/$PACKAGE" mkdir -p $SRC_DIR -if [ "$PACKAGE_EXT" == "bz2" ]; then - tarflag="j" -else - tarflag="z" -fi - if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then - wget "$URL" -O "$SRC_DIR/$SRC" - wget "$URL.sig" -O "$SRC_DIR/$SRC.sig" + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET + wget "$URL.sig" -O "$SRC_DIR/$SRC.sig" || exit $ERROR_WGET fi if [ ! -f "$SRC_DIR/$PACKAGE-key.asc" ]; then - wget "$KEY" -O "$SRC_DIR/$PACKAGE-key.asc" && gpg --import $SRC_DIR/$PACKAGE-key.asc + wget "$KEY" -O "$SRC_DIR/$PACKAGE-key.asc" && gpg --import $SRC_DIR/$PACKAGE-key.asc || exit $ERROR_WGET fi -gpg --verify $SRC_DIR/$SRC.sig $SRC || echo WARNING: Could not check signature or WRONG signature found. +gpg --verify $SRC_DIR/$SRC.sig $SRC || exit $ERROR_GPG if [ "$ARCH" == "x86_64" ]; then LIBDIR="/usr/lib64" @@ -84,12 +89,12 @@ rm -rf $TMP mkdir -p $TMP cd $TMP -tar xvf$tarflag $SRC_DIR/$PACKAGE-$VERSION.tar.$PACKAGE_EXT +tar xvf $SRC_DIR/$PACKAGE-$VERSION.tar.$PACKAGE_EXT || exit $ERROR_TAR cd $PACKAGE-$VERSION -./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR -make || exit 32 +./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR || exit $ERROR_CONF +make || exit $ERROR_MAKE make check -make DESTDIR=$TMP/package-$PACKAGE install +make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL CWD="`pwd`" @@ -133,7 +138,7 @@ for file in 00README.NOW.OR.SUFFER AUTHORS COPYING ChangeLog INSTALL NEWS README done echo We need to run makepkg as root. -su -c "chown -R root.root . ; makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz" +su -c "chown -R root.root . ; makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG if [ "$CLEANUP" == "yes" ]; then rm -rf $TMP diff --git a/net/mail/courier-imap/slack-required b/net/mail/courier-imap/slack-required new file mode 100644 index 00000000..700355e4 --- /dev/null +++ b/net/mail/courier-imap/slack-required @@ -0,0 +1 @@ +courier-authlib -- cgit v1.2.3