aboutsummaryrefslogtreecommitdiff
path: root/cryptsetup/cryptsetup-luks.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'cryptsetup/cryptsetup-luks.SlackBuild')
-rwxr-xr-xcryptsetup/cryptsetup-luks.SlackBuild40
1 files changed, 21 insertions, 19 deletions
diff --git a/cryptsetup/cryptsetup-luks.SlackBuild b/cryptsetup/cryptsetup-luks.SlackBuild
index 8e018e79..4cd6745a 100755
--- a/cryptsetup/cryptsetup-luks.SlackBuild
+++ b/cryptsetup/cryptsetup-luks.SlackBuild
@@ -4,20 +4,16 @@
# by rhatto at riseup.net
#
-cat << EOCAT
-Just remembering, you need the following packages installed:
-
- libgcrypt
- libgpg-error
-
-EOCAT
-
-if [ "$INTERACT" != "no" ]; then
- echo "Hit ENTER do continue, Crtl-C to abort"
- read crap
-else
- echo sleeping 3 seconds...
- sleep 3
+if [ -s "slack-required" ]; then
+ echo Recomended and required packages for building cairo 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`"
@@ -39,6 +35,12 @@ SRC_DIR=${SRC:=$CWD}
TMP=${TMP:=/tmp}
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 [ "$ARCH" == "x86_64" ]; then
LIBDIR=/usr/lib64
else
@@ -60,7 +62,7 @@ else
fi
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"
@@ -71,9 +73,9 @@ cd $TMP
tar xvf$tarflag $SRC_DIR/$SRC
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`"
@@ -112,7 +114,7 @@ for file in ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README; do
cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/
done
-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