summaryrefslogtreecommitdiffstats
path: root/source/a/jfsutils/jfsutils.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/jfsutils/jfsutils.SlackBuild')
-rwxr-xr-xsource/a/jfsutils/jfsutils.SlackBuild26
1 files changed, 22 insertions, 4 deletions
diff --git a/source/a/jfsutils/jfsutils.SlackBuild b/source/a/jfsutils/jfsutils.SlackBuild
index d97ebcb62..1795e9703 100755
--- a/source/a/jfsutils/jfsutils.SlackBuild
+++ b/source/a/jfsutils/jfsutils.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,10 +21,20 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=${VERSION:-1.1.14}
-ARCH=${ARCH:-x86_64}
+PKGNAM=jfsutils
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-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
+
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-jfsutils
@@ -80,9 +90,17 @@ done
mkdir -p $PKG/usr/doc/jfsutils-$VERSION
cp -a \
- AUTHORS COPYING ChangeLog NEWS README \
+ AUTHORS COPYING* NEWS README \
$PKG/usr/doc/jfsutils-$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
+
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null