diff options
Diffstat (limited to 'source/a/cryptsetup/cryptsetup.SlackBuild')
-rwxr-xr-x | source/a/cryptsetup/cryptsetup.SlackBuild | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/source/a/cryptsetup/cryptsetup.SlackBuild b/source/a/cryptsetup/cryptsetup.SlackBuild index 17d7444d..318417aa 100755 --- a/source/a/cryptsetup/cryptsetup.SlackBuild +++ b/source/a/cryptsetup/cryptsetup.SlackBuild @@ -1,7 +1,7 @@ -#!/bin/sh +#!/bin/bash # Copyright (c) 2007, 2009, 2010 Eric Hameleers <alien@slackware.com> -# Copyright (c) 2007, 2009, 2010, 2015 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright (c) 2007, 2009, 2010, 2015, 2017, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -32,9 +32,11 @@ # # ----------------------------------------------------------------------------- +cd $(dirname $0) ; CWD=$(pwd) + PKGNAM=cryptsetup VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -46,6 +48,14 @@ if [ -z "$ARCH" ]; then esac fi +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" @@ -60,7 +70,6 @@ else LIBDIRSUFFIX="" fi -CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-cryptsetup @@ -70,7 +79,7 @@ mkdir -p $TMP $PKG/usr cd $TMP rm -rf cryptsetup-$VERSION tar xvf $CWD/cryptsetup-$VERSION.tar.xz || exit 1 -cd cryptsetup-$VERSION +cd cryptsetup-$VERSION || exit 1 chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -85,11 +94,13 @@ CFLAGS="$SLKCFLAGS" \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --localstatedir=/var \ --sysconfdir=/etc \ + --enable-cryptsetup-reencrypt \ --mandir=/usr/man \ --docdir=/usr/doc/cryptsetup-$VERSION \ - --build=$ARCH-slackware-linux -make -make DESTDIR=$PKG install + --build=$ARCH-slackware-linux || exit 1 + +make || exit 1 +make DESTDIR=$PKG install || exit 1 # Move the shared library to $PKG/lib${LIBDIRSUFFIX}: mkdir -p $PKG/lib${LIBDIRSUFFIX} @@ -101,6 +112,9 @@ mkdir -p $PKG/lib${LIBDIRSUFFIX} cp -a lib*.so.? ../../lib${LIBDIRSUFFIX} ) +# Don't ship .la files: +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + # Move the cryptsetup binary to $PKG/sbin: mkdir -p $PKG/sbin ( cd $PKG/usr/sbin @@ -110,7 +124,7 @@ mkdir -p $PKG/sbin mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION cp -a \ - AUTHORS COPYING* INSTALL NEWS README TODO FAQ \ + AUTHORS COPYING* INSTALL NEWS README* TODO FAQ \ $PKG/usr/doc/$PKGNAM-$VERSION # If there's a ChangeLog, installing at least part of the recent history |