summaryrefslogtreecommitdiff
path: root/source/a/cryptsetup
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2010-05-19 08:58:23 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 22:43:05 +0200
commitb76270bf9e6dd375e495fec92140a79a79415d27 (patch)
tree3dbed78b2279bf9f14207a16dc634b90995cbd40 /source/a/cryptsetup
parent5a12e7c134274dba706667107d10d231517d3e05 (diff)
downloadcurrent-b76270bf9e6dd375e495fec92140a79a79415d27.tar.gz
Slackware 13.1slackware-13.1
Wed May 19 08:58:23 UTC 2010 Slackware 13.1 x86_64 stable is released! Lots of thanks are due -- see the RELEASE_NOTES and the rest of the ChangeLog for credits. The ISOs are on their way to replication, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We are taking pre-orders now at store.slackware.com, and offering a discount if you sign up for a subscription. Consider picking up a copy to help support the project. Thanks again to the Slackware community for testing, contributing, and generally holding us to a high level of quality. :-) Enjoy!
Diffstat (limited to 'source/a/cryptsetup')
-rwxr-xr-xsource/a/cryptsetup/cryptsetup.SlackBuild106
1 files changed, 48 insertions, 58 deletions
diff --git a/source/a/cryptsetup/cryptsetup.SlackBuild b/source/a/cryptsetup/cryptsetup.SlackBuild
index 7a7f3a8b..35b674ae 100755
--- a/source/a/cryptsetup/cryptsetup.SlackBuild
+++ b/source/a/cryptsetup/cryptsetup.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
-# Copyright (c) 2007, 2009 Eric Hameleers <alien@slackware.com>
-# Copyright (c) 2007, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright (c) 2007, 2009, 2010 Eric Hameleers <alien@slackware.com>
+# Copyright (c) 2007, 2009, 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -28,15 +28,23 @@
# By: Eric Hameleers <alien@slackware.com>
# For: cryptsetup
# Descr: Utility for setting up encrypted filesystems
-# URL: http://luks.endorphin.org/dm-crypt
+# URL: http://code.google.com/p/cryptsetup/
#
# -----------------------------------------------------------------------------
-PRGNAM=cryptsetup
-VERSION=${VERSION:-1.0.7}
-ARCH=${ARCH:-x86_64}
-BUILD=${BUILD:-1}
-
+PKGNAM=cryptsetup
+VERSION=${VERSION:-1.1.0}
+BUILD=${BUILD:-2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
@@ -47,6 +55,9 @@ elif [ "$ARCH" = "s390" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
CWD=$(pwd)
@@ -67,7 +78,6 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-echo Building ...
LDFLAGS="$SLKLDFLAGS" \
CFLAGS="$SLKCFLAGS" \
./configure \
@@ -76,60 +86,40 @@ CFLAGS="$SLKCFLAGS" \
--localstatedir=/var \
--sysconfdir=/etc \
--mandir=/usr/man \
- --enable-libgcrypt \
- --enable-libdevmapper \
- --program-prefix= \
- --program-suffix= \
+ --docdir=/usr/doc/cryptsetup-$VERSION \
--build=$ARCH-slackware-linux
make
make DESTDIR=$PKG install
-#
-# Next, make the static version that we will use for mkinitrd:
-#
-
-make clean
-echo Building ...
-LDFLAGS="$SLKLDFLAGS" \
-CFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --localstatedir=/var \
- --sysconfdir=/etc \
- --mandir=/usr/man \
- --enable-libgcrypt \
- --enable-libdevmapper \
- --enable-static \
- --disable-shared \
- --disable-shared-library \
- --program-prefix= \
- --program-suffix= \
- --build=$ARCH-slackware-linux
-make
-
-# I have to do one old-school thing to leave a mark here:
+# Move the shared library to $PKG/lib${LIBDIRSUFFIX}:
+mkdir -p $PKG/lib${LIBDIRSUFFIX}
+( cd $PKG/usr/lib${LIBDIRSUFFIX}
+ for file in lib*.so.?.* ; do
+ mv $file ../../lib${LIBDIRSUFFIX}
+ ln -sf ../../lib${LIBDIRSUFFIX}/$file .
+ done
+ cp -a lib*.so.? ../../lib${LIBDIRSUFFIX}
+)
+
+# Move the cryptsetup binary to $PKG/sbin:
mkdir -p $PKG/sbin
-cat src/cryptsetup > $PKG/sbin/cryptsetup.static
-chmod 755 $PKG/sbin/cryptsetup.static
-
-mv $PKG/usr/sbin/cryptsetup $PKG/usr/sbin/cryptsetup.dynamic
-# Replace with a link:
-( cd $PKG/usr/sbin ; ln -sf cryptsetup.dynamic cryptsetup )
-# In /sbin, use the static version as /usr *might* not be mounted yet.
-# However, note that some cryptsetup operations cause the static
-# version to segfault, so for things like formatting you'll want
-# to use the dynamic one. That's what should be in the $PATH first.
-( cd $PKG/sbin ; ln -sf cryptsetup.static cryptsetup )
-
-# Remove unneeded empty directory:
-#rmdir $PKG/usr/lib/cryptsetup
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+( cd $PKG/usr/sbin
+ mv cryptsetup ../../sbin
+ ln -sf ../../sbin/cryptsetup .
+)
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a \
- AUTHORS COPYING* ChangeLog INSTALL NEWS README TODO \
- $PKG/usr/doc/$PRGNAM-$VERSION
-chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/*
+ AUTHORS COPYING* INSTALL NEWS README TODO \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; || true
@@ -140,5 +130,5 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $TMP/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz