From c48724a36d09c07c91483e5e3128263bf16f1af0 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sun, 6 Sep 2009 14:19:44 +0000 Subject: Adapt for 6.2a --- truecrypt/build/truecrypt.SlackBuild | 54 +++++++++++++----------------------- 1 file changed, 19 insertions(+), 35 deletions(-) (limited to 'truecrypt') diff --git a/truecrypt/build/truecrypt.SlackBuild b/truecrypt/build/truecrypt.SlackBuild index 155cfaae..afc4f7d0 100755 --- a/truecrypt/build/truecrypt.SlackBuild +++ b/truecrypt/build/truecrypt.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright (c) 2006-2008 Eric Hameleers +# Copyright (c) 2006-2009 Eric Hameleers # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -53,8 +53,10 @@ # kernel version dependant (by using fuse). # 6.0a-1: 10/Jul/2008 by Eric Hameleers # * New release +# 6.2a-1: 06/sep/2009 by Eric Hameleers +# * New release # -# Run 'sh truecrypt.SlackBuild --cleanup' to build a Slackware package. +# Run 'sh truecrypt.SlackBuild' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . # Install using 'installpkg'. # @@ -63,7 +65,7 @@ # Set initial variables: PRGNAM=truecrypt -VERSION=${VERSION:-6.0a} +VERSION=${VERSION:-6.2a} ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-alien} @@ -83,7 +85,7 @@ SOURCE[0]="$SRCDIR/${PRGNAM}-${VERSION}-source.tar.gz" SRCURL[0]="" SOURCE[1]="$SRCDIR/wxWidgets-${WX}.tar.gz" -SRCURL[1]="http://downloads.sourceforge.net/wxwindows/wxWidgets-${WX}.tar.gz" +SRCURL[1]="http://dl.sourceforge.net/wxwindows/wxWidgets-${WX}.tar.gz" ## ## --- with a little luck, you won't have to edit below this point --- ## @@ -96,15 +98,8 @@ trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR set -u P1=${1:-1} -# Slackware 11 and up need other option (gcc > 3.3.x) -if [ $(gcc -dumpversion | tr -d '.' |cut -c 1-2) -gt 33 ]; then - MOPT=tune -else - MOPT=cpu -fi - case "$ARCH" in - i486) SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686" + i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; s390) SLKCFLAGS="-O2" @@ -116,9 +111,6 @@ case "$ARCH" in x86_64) SLKCFLAGS="-O2 -fPIC" SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" ;; - athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" - SLKLDFLAGS=""; LIBDIRSUFFIX="" - ;; esac # Create working directories: @@ -163,22 +155,18 @@ echo "++" cd $TMP/tmp-$PRGNAM echo "Extracting the source archive(s) for $PRGNAM..." for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do - if $(file ${SOURCE[$i]} | grep -q ": bzip2"); then - tar -xjvf ${SOURCE[$i]} - elif $(file ${SOURCE[$i]} | grep -q ": gzip"); then - tar -xzvf ${SOURCE[$i]} - fi + tar -xvf ${SOURCE[$i]} done mv ${PRGNAM}-${VERSION}-source ${PRGNAM}-${VERSION} cd ${PRGNAM}-${VERSION} # Fix dismount failure: cat $SRCDIR/${PRGNAM}-${VERSION}_umount.patch | patch -p1 \ 2>&1 | tee $OUTPUT/patch-${PRGNAM}.log -# If you use gcc 4.3 you'll need this: -if [ $(gcc -dumpversion | tr -d '.' |cut -c 1-2) -ge 43 ]; then - cat $SRCDIR/${PRGNAM}_gcc43.patch | patch -p1 \ - 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log -fi +## If you use gcc 4.3 you'll need this: +#if [ $(gcc -dumpversion | tr -d '.' |cut -c 1-2) -ge 43 ]; then +# cat $SRCDIR/${PRGNAM}_gcc43.patch | patch -p1 \ +# 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log +#fi chown -R root:root . chmod -R u+w,go+r-w,a-s . @@ -215,7 +203,7 @@ cat <<-EOT > $PKG/usr/share/applications/truecrypt.desktop cat <> $PKG/install/doinst.sh # Update the desktop database: if [ -x usr/bin/update-desktop-database ]; then - chroot . /usr/bin/update-desktop-database /usr/share/applications > /dev/null 2>&1 + chroot . /usr/bin/update-desktop-database usr/share/applications > /dev/null 2>&1 fi EOT @@ -223,16 +211,17 @@ EOT # Add documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a Readme.txt License.txt Release/Setup\ Files/*.pdf $PKG/usr/doc/$PRGNAM-$VERSION || true -cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $SRCDIR/$(basename $0) | sed \ + -e "/^VERSION=/s/:-.*}/:-$VERSION}/" \ + -e "/^ARCH=/s/:-.*}/:-$ARCH}/" \ + -e "/^BUILD=/s/:-.*}/:-$BUILD}/" \ + > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION find $PKG/usr/doc -type f -exec chmod 644 {} \; # Add a package description: mkdir -p $PKG/install cat $SRCDIR/slack-desc > $PKG/install/slack-desc -if [ -f $SRCDIR/doinst.sh ]; then - cat $SRCDIR/doinst.sh >> $PKG/install/doinst.sh -fi # Build the package: cd $PKG @@ -242,8 +231,3 @@ md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${ cd - cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt -# Clean up the extra stuff: -if [ "$P1" = "--cleanup" ]; then - rm -rf $TMP/tmp-$PRGNAM - rm -rf $PKG -fi -- cgit v1.2.3