summaryrefslogtreecommitdiffstats
path: root/cabextract
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2010-06-02 20:26:38 +0000
committer Eric Hameleers <alien@slackware.com>2010-06-02 20:26:38 +0000
commitbb3b83181f514f30dcb9257169495aada12db611 (patch)
tree4aa46319e3daff3d15c1b50412caeb9b3ce286ab /cabextract
parent86a39fd60b3bb6e15fa1aaf6898ef4b06a1e47fd (diff)
downloadasb-bb3b83181f514f30dcb9257169495aada12db611.tar.gz
asb-bb3b83181f514f30dcb9257169495aada12db611.tar.xz
Rebuilt for Slackware 13.1
Diffstat (limited to 'cabextract')
-rwxr-xr-xcabextract/build/cabextract.SlackBuild62
1 files changed, 38 insertions, 24 deletions
diff --git a/cabextract/build/cabextract.SlackBuild b/cabextract/build/cabextract.SlackBuild
index 435cfa9b..7495b8c8 100755
--- a/cabextract/build/cabextract.SlackBuild
+++ b/cabextract/build/cabextract.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright (c) 2007-2009 Eric Hameleers, Eindhoven, NL
+# Copyright (c) 2007-2010 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -36,6 +36,8 @@
# * Update, and reworked SlackBuild.
# 1.2-2: 21/sep/2009 by Eric Hameleers <alien@slackware.com>
# * Updated the SlackBuild a bit for x86_64 compatibility
+# 1.2-3: 02/jun/2010 by Eric Hameleers <alien@slackware.com>
+# * Rebuilt for Slackware 13.1.
#
# Run 'sh cabextract.SlackBuild --cleanup' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
@@ -47,8 +49,7 @@
PRGNAM=cabextract
VERSION=${VERSION:-1.2}
-ARCH=${ARCH:-i486}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-alien}
DOCS="AUTHORS COPYING ChangeLog NEWS README TODO \
@@ -69,34 +70,47 @@ SRCURL="http://www.cabextract.org.uk/${PRGNAM}-${VERSION}.tar.gz"
## --- with a little luck, you won't have to edit below this point --- ##
##
-# Exit the script on errors:
-set -e
-trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR
-# Catch unitialized variables:
-set -u
-P1=${1:-1}
+# 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
case "$ARCH" in
i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
- s390) SLKCFLAGS="-O2"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
- ;;
- powerpc) SLKCFLAGS="-O2"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
- ;;
x86_64) SLKCFLAGS="-O2 -fPIC"
SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
;;
+ *) SLKCFLAGS="-O2"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
esac
+# Exit the script on errors:
+set -e
+trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR
+# Catch unitialized variables:
+set -u
+P1=${1:-1}
+
+# Save old umask and set to 0022:
+_UMASK_=$(umask)
+umask 0022
+
# Create working directories:
+mkdir -p $OUTPUT # place for the package to be saved
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/* # erase old package's contents
-mkdir -p $OUTPUT # place for the package to be saved
+rm -rf $PKG/* # always erase old package's contents
+rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build
+rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log
+ # remove old log files
# Source file availability:
if ! [ -f ${SOURCE} ]; then
@@ -134,7 +148,7 @@ echo "Extracting the source archive(s) for $PRGNAM..."
tar -xvf ${SOURCE}
cd ${PRGNAM}-${VERSION}
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+chmod -R u+w,go+r-w,a+X-s .
echo Building ...
LDFLAGS="$SLKLDFLAGS" \
@@ -158,11 +172,8 @@ cp -a src/cabinfo src/wince_* $PKG/usr/bin/
# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true
-cat $SRCDIR/$(basename $0) | sed \
- -e "/^VERSION=/s/:-.*}/:-$VERSION}/" \
- -e "/^ARCH=/s/:-.*}/:-$ARCH}/" \
- -e "/^BUILD=/s/:-.*}/:-$BUILD}/" \
- > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cat $SRCDIR/$(basename $0) > $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 'ja' man pages:
@@ -188,3 +199,6 @@ md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${
cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt
+# Restore the original umask:
+umask ${_UMASK_}
+