summaryrefslogtreecommitdiffstats
path: root/truecrypt/build
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2006-04-18 19:39:47 +0000
committer Eric Hameleers <alien@slackware.com>2006-04-18 19:39:47 +0000
commit0b96766b56095ca9e2dc1d41a199abe50f7e611f (patch)
treef0fa2a0936e7c5c0b9af606f6c9b2ec3fd938017 /truecrypt/build
parentdbfc29bbd90e87a446e2254ee30c3671a1a3d9a3 (diff)
downloadasb-0b96766b56095ca9e2dc1d41a199abe50f7e611f.tar.gz
asb-0b96766b56095ca9e2dc1d41a199abe50f7e611f.tar.xz
Fairly large re-write for 4.2
Diffstat (limited to 'truecrypt/build')
-rwxr-xr-xtruecrypt/build/truecrypt.SlackBuild92
1 files changed, 19 insertions, 73 deletions
diff --git a/truecrypt/build/truecrypt.SlackBuild b/truecrypt/build/truecrypt.SlackBuild
index d0f94184..5f4e676f 100755
--- a/truecrypt/build/truecrypt.SlackBuild
+++ b/truecrypt/build/truecrypt.SlackBuild
@@ -1,6 +1,7 @@
#!/bin/sh
-# Copyright (c) 2006 Eric Hameleers <alien@sox.homeip.net>
+# Copyright (c) 2006 Eric Hameleers <alien@slackware.com>
# Distributed under the terms of the GNU General Public License, Version 2
+# $Id$
# -----------------------------------------------------------------------------
#
# Slackware SlackBuild script
@@ -8,10 +9,13 @@
# By: Eric Hameleers <alien@slackware.com>
# For: truecrypt
# URL: http://www.truecrypt.org/
-# Needs:
+# Needs: device-mapper >= 1.00.08
# Changelog:
# 4.0-1: 02/Nov/2005 by Eric Hameleers <alien@slackware.com>
# * Initial build.
+# 4.2-1: 18/apr/2006 by Eric Hameleers <alien@slackware.com>
+# * This release makes the Linux build independent of MS Windows.
+# (so far, crypted containers could only be created in Windows).
#
# Run 'sh SlackBuild --cleanup' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
@@ -27,29 +31,22 @@ if [ "$TMP" = "" ]; then
fi
PRGNAM=truecrypt
-VERSION=4.0
+VERSION=4.2
ARCH=${ARCH:-i486}
BUILD=1
DOCS="README.1st Readme.txt License.txt userguide.pdf"
-# If you do *not* want non-admin users to be able to use truecrypt, set
-# BINPERM=0750
-BINPERM=4755
-
-# For now, the build script is quite fascist about the kernel version.
-# You can only build against the *running* kernel :-(
-KVER=${KVER:-`uname -r`}
-
-# If you have more source files, list them here as SOURCE[1], SOURCE[2], etc.
-# If you know the URL for a source file, you can put that into the SRCURL[]
-# variable, and the SlackBuild script will try to download it for you.
+KVER=${KVER:-$(uname -r)}
SOURCE[0]="${PRGNAM}-${VERSION}-source-code.tar.gz"
-SRCURL[0]=""
-
PATCH[0]="${PRGNAM}_ksrc.patch"
-PATCHURL[0]=""
+
+# ---------------------------------------------------------------------
+# If you do *not* want non-admin users to be able to use truecrypt, set
+# BINPERM=0750
+BINPERM=4755
+# ---------------------------------------------------------------------
##
## --- with a little luck, you won't have to edit below this point --- ##
@@ -82,46 +79,6 @@ if [ ! -d $PKG ]; then
mkdir -p $PKG # place for the package to be built
fi
-
-# --- SOURCE FILE AVAILABILITY ---
-
-for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do
- if ! [ -f ${CWD}/${SOURCE[$i]} ]; then
- if ! [ "${SRCURL[$i]}" = "" ]; then
- echo "Source '${SOURCE[$i]}' not available yet... will download now:"
- wget -nv -O "${CWD}/${SOURCE[$i]}" "${SRCURL[$i]}"
- if [ $? -ne 0 ]; then
- echo "Downloading '${SOURCE[$i]}' failed... aborting the build."
- exit 1
- fi
- else
- echo "File '${SOURCE[$i]}' not available... aborting the build."
- exit 1
- fi
- fi
-done
-
-for (( i = 0; i < ${#PATCH[*]}; i++ )) ; do
- if ! [ -f ${CWD}/${PATCH[$i]} ]; then
- if ! [ "${PATCHURL[$i]}" = "" ]; then
- echo "Patch '${PATCH[$i]}' not available yet... will download now:"
- wget -nv -O "${CWD}/${PATCH[$i]}" "${PATCHURL[$i]}"
- if [ $? -ne 0 ]; then
- echo "Downloading '${PATCH[$i]}' failed... aborting the build."
- exit 1
- fi
- else
- echo "File '${PATCH[$i]}' not available... aborting the build."
- exit 1
- fi
- fi
-done
-
-if [ "$1" == "--download" ]; then
- echo "Download complete."
- exit 0
-fi
-
# --- PACKAGE BUILDING ---
echo "++"
@@ -153,17 +110,8 @@ cd $TMP/tmp-$PRGNAM
# --- TARBALL EXTRACTION,PATCH,MODIFY ---
echo "Extracting the program tarball(s) for $PRGNAM..."
-for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do
- if `file $CWD/${SOURCE[$i]} | grep -q ": bzip2"`; then
- tar -xjvf $CWD/${SOURCE[$i]}
- elif `file $CWD/${SOURCE[$i]} | grep -qi ": zip"`; then
- unzip $CWD/${SOURCE[$i]}
- else
- tar -xzvf $CWD/${SOURCE[$i]}
- fi
-done
+tar -xzvf $CWD/${SOURCE[0]}
cd ${PRGNAM}-${VERSION}
-patch -p1 < $CWD/${PRGNAM}_ksrc.patch
chown -R root.root *
find . -perm 777 -exec chmod 755 {} \;
@@ -175,6 +123,7 @@ find . -exec chmod +r {} \;
echo Building ...
cd Linux
+patch -p0 < $CWD/${PATCH[0]}
CFLAGS="$SLKCFLAGS" \
./build.sh 2>&1 | tee $CWD/build-${PRGNAM}.log
@@ -248,8 +197,7 @@ cp -a $DOCS \
chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/*
# Compress the man page(s)
-gzip -9f $PKG/usr/man/*/*
-gzip -9f $PKG/usr/man/*/*/*
+find $PKG/usr/man -name "*.?" -type f -exec gzip -9f {} \;
# Strip binaries
( cd $PKG
@@ -261,8 +209,6 @@ gzip -9f $PKG/usr/man/*/*/*
# --- OWNERSHIP, RIGHTS ---
chmod -R o-w $PKG
-chown root:bin $PKG/usr/bin/* $PKG/usr/sbin/* $PKG/bin/* $PKG/sbin/* \
- $PKG/usr/X11R6/bin/* $PKG/opt/kde/bin/* 2>/dev/null
# --- PACKAGE DESCRIPTION ---
@@ -285,8 +231,8 @@ makepkg --linkadd y --chown n $TMP/${PRGNAM}-${VERSION}_${KVER}-${ARCH}-${BUILD}
2>&1 | tee $CWD/makepkg-${PRGNAM}.log
(cd $TMP && md5sum ${PRGNAM}-${VERSION}_${KVER}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${VERSION}_${KVER}-${ARCH}-${BUILD}.tgz.md5)
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $TMP/${PRGNAM}-${VERSION}_${KVER}-${ARCH}-${BUILD}.txt
-if [ -f $CWD/slack-requires ]; then
- cat $CWD/slack-requires > $TMP/${PRGNAM}-${VERSION}_${KVER}-${ARCH}-${BUILD}.dep
+if [ -f $PKG/install/slack-requires ]; then
+ cat $PKG/install/slack-requires > $TMP/${PRGNAM}-${VERSION}_${KVER}-${ARCH}-${BUILD}.dep
fi