diff options
author | Eric Hameleers <alien@slackware.com> | 2007-10-13 21:44:21 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2007-10-13 21:44:21 +0000 |
commit | 500aed7b49c0f5edf811ee210a0168d45e122245 (patch) | |
tree | de5e2f8b3f06907c1e694638959f4892691b4143 /cryptmount | |
parent | e5c0a42fe372247d4fbf114c2203d0def11f9512 (diff) | |
download | asb-500aed7b49c0f5edf811ee210a0168d45e122245.tar.gz asb-500aed7b49c0f5edf811ee210a0168d45e122245.tar.xz |
Update
Diffstat (limited to 'cryptmount')
-rwxr-xr-x | cryptmount/build/cryptmount.SlackBuild | 69 |
1 files changed, 19 insertions, 50 deletions
diff --git a/cryptmount/build/cryptmount.SlackBuild b/cryptmount/build/cryptmount.SlackBuild index 045e684b..a613fdfd 100755 --- a/cryptmount/build/cryptmount.SlackBuild +++ b/cryptmount/build/cryptmount.SlackBuild @@ -37,6 +37,8 @@ # 2.0-2: 31/jul/2007 by Eric Hameleers <alien@slackware.com> # * Make sure that an esisting modofied rc.cryptmount script # is not overwritten. +# 2.1-1: 13/oct/2007 by Eric Hameleers <alien@slackware.com> +# * Update. # # Run 'sh cryptmount.SlackBuild --cleanup' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . @@ -44,15 +46,14 @@ # # ----------------------------------------------------------------------------- -# --- INIT --- # Set initial variables: PRGNAM=cryptmount -VERSION=${VERSION:-"2.0"} +VERSION=${VERSION:-"2.1"} ARCH=${ARCH:-"i486"} -BUILD=${BUILD:-2} +BUILD=${BUILD:-1} -DOCS="AUTHORS ChangeLog COPYING NEWS README RELNOTES ToDo" +DOCS="AUTHORS ChangeLog COPYING NEWS README* RELNOTES ToDo" # Cryptmount can use OpenSSL and/or libgcrypt for encryption of keys. # Slackware 11.0 does not have gcrypt for instance unless you install it as @@ -113,28 +114,13 @@ case "$ARCH" in ;; esac -if [ ! -d $TMP/tmp-$PRGNAM ]; then - mkdir -p $TMP/tmp-$PRGNAM # location to build the source -elif [ "$P1" != "--oldbuild" ]; then - # If the "--oldbuild" parameter is present, we keep - # the old build files and continue; - # By default we remove the remnants of previous build and continue: - rm -rf $TMP/tmp-$PRGNAM/* -fi - -if [ ! -d $PKG ]; then - mkdir -p $PKG # place for the package to be built -else - rm -rf $PKG/* # We always erase old package's contents: -fi - -if [ ! -d $OUTPUT ]; then - mkdir -p $OUTPUT # place for the package to be saved -fi - - -# --- SOURCE FILE AVAILABILITY --- +mkdir -p $TMP/tmp-$PRGNAM # location to build the source +rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build +mkdir -p $PKG # place for the package to be built +rm -rf $PKG/* # We always erase old package's contents: +mkdir -p $OUTPUT # place for the package to be saved +# Source file availability: if ! [ -f ${SOURCE} ]; then if ! [ "x${SRCURL}" == "x" ]; then # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT @@ -142,7 +128,7 @@ if ! [ -f ${SOURCE} ]; then echo "Source '`basename ${SOURCE}`' not available yet..." echo "Will download file to `dirname $SOURCE`" wget -nv --connect-timeout=15 -O "${SOURCE}" "${SRCURL}" || true - if [ $? -ne 0 ]; then + if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then echo "Downloading '`basename ${SOURCE}`' failed... aborting the build." mv -f "${SOURCE}" "${SOURCE}".FAIL exit 1 @@ -198,13 +184,11 @@ CFLAGS="$SLKCFLAGS" \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log -# # Install all the needed stuff to the package dir -# # Use installwatch if available, to produce a logfile of the installation # process that is more easily readable: -mkdir -p $PKG/etc/{init.d,default} -if `which installwatch > /dev/null 2>&1`; then +mkdir -p $PKG/etc/{init.d,default} $PKG/usr/{s,}bin +if `which installwatch > /dev/null 2>&1`; then installwatch -o $OUTPUT/install-${PRGNAM}.log make DESTDIR=$PKG install else make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log @@ -256,37 +240,28 @@ fi EOINS - -# --- DOCUMENTATION --- - +# Add some documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true mv $PKG/etc/cryptmount/cmtab.example $PKG/usr/doc/$PRGNAM-$VERSION chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/* -# Move incorrectly installed man pages, if any +# Move incorrectly installed man pages, if any: [ -d $PKG/usr/share/man ] && \ mv $PKG/usr/share/man $PKG/usr/ && rmdir $PKG/usr/share || true -# Compress the man page(s) +# Compress the man page(s): if [ -d $PKG/usr/man ]; then find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; for i in `find $PKG/usr/man -type l -name "*.?"` ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done fi -# Strip binaries +# Strip binaries: cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true cd - - -# --- OWNERSHIP, RIGHTS --- - -chmod -R o-w $PKG - - -# --- PACKAGE DESCRIPTION --- - +# Add a package description: mkdir -p $PKG/install cat $SRCDIR/slack-desc > $PKG/install/slack-desc if [ -f $SRCDIR/doinst.sh ]; then @@ -296,9 +271,6 @@ if [ -f $SRCDIR/slack-required ]; then cat $SRCDIR/slack-required > $PKG/install/slack-required fi - -# --- BUILDING --- - # Build the package: cd $PKG makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log @@ -310,9 +282,6 @@ if [ -f $PKG/install/slack-required ]; then cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.dep fi - -# --- CLEANUP --- - # Clean up the extra stuff: if [ "$P1" = "--cleanup" ]; then rm -rf $TMP/tmp-$PRGNAM |