diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2006-12-05 22:15:56 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2006-12-05 22:15:56 +0000 |
commit | c20b6003899ebe6eaf9cda920dba28396e507188 (patch) | |
tree | b323c5dc399d39bcdd29e04069dea96479f5e9a0 /net/libs/courier-authlib | |
parent | a5882eb41c3230fea51590f824cbdf2d94020045 (diff) | |
download | slackbuilds-c20b6003899ebe6eaf9cda920dba28396e507188.tar.gz slackbuilds-c20b6003899ebe6eaf9cda920dba28396e507188.tar.bz2 |
courier-authlib update
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@883 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'net/libs/courier-authlib')
-rwxr-xr-x | net/libs/courier-authlib/courier-authlib.SlackBuild | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/net/libs/courier-authlib/courier-authlib.SlackBuild b/net/libs/courier-authlib/courier-authlib.SlackBuild index 0033dfc6..a4ca3d92 100755 --- a/net/libs/courier-authlib/courier-authlib.SlackBuild +++ b/net/libs/courier-authlib/courier-authlib.SlackBuild @@ -4,6 +4,18 @@ # by rhatto at riseup.net # +if [ -s "slack-required" ]; then + echo Recomended and required packages for building courier-authlib 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`" if [ -f ~/.slackbuildrc ]; then @@ -21,6 +33,12 @@ TMP=${TMP:=/tmp} REPOS=${REPOS:=$TMP} SRC_DIR=${SRC:=$CWD} +# ------- 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 [ "$ARCH" == "x86_64" ]; then LIBDIR=/usr/lib64 else @@ -33,36 +51,30 @@ KEY="http://www.courier-mta.org/KEYS.bin" SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" URL="http://easynews.dl.sourceforge.net/sourceforge/courier/$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.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 TMP="$TMP/$PACKAGE" 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 -./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR -make || exit 32 -make DESTDIR=$TMP/package-$PACKAGE install +./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR || exit $ERROR_CONF +make || exit $ERROR_MAKE +make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL CWD="`pwd`" @@ -103,7 +115,7 @@ done echo 'chroot . /sbin/ldconfig' > 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 |