]> gitweb.fluxo.info Git - slackbuilds.git/commitdiff
courier-imap update
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Tue, 5 Dec 2006 22:19:11 +0000 (22:19 +0000)
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Tue, 5 Dec 2006 22:19:11 +0000 (22:19 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@884 370017ae-e619-0410-ac65-c121f96126d4

net/mail/courier-imap/courier-imap.SlackBuild
net/mail/courier-imap/slack-required [new file with mode: 0644]

index 1e1679a85ba8886cc8b2f4fb4f3efde599a97218..cff8638d0b7830adf4ea6cc62949fdb178bfb248 100755 (executable)
@@ -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 (file)
index 0000000..700355e
--- /dev/null
@@ -0,0 +1 @@
+courier-authlib