summaryrefslogtreecommitdiffstats
path: root/unrar
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2009-11-15 20:06:25 +0000
committer Eric Hameleers <alien@slackware.com>2009-11-15 20:06:25 +0000
commit82abfc1ca32fa232bb71d3335b79af3a011e6498 (patch)
treef01e881f212d76de5c295efefed87f06e59e7d52 /unrar
parent8f25527daaba6d5cf4ada9d0891bd1f00391baad (diff)
downloadasb-82abfc1ca32fa232bb71d3335b79af3a011e6498.tar.gz
asb-82abfc1ca32fa232bb71d3335b79af3a011e6498.tar.xz
Update to 3.9.6
Diffstat (limited to 'unrar')
-rwxr-xr-xunrar/build/unrar.SlackBuild54
1 files changed, 21 insertions, 33 deletions
diff --git a/unrar/build/unrar.SlackBuild b/unrar/build/unrar.SlackBuild
index b88b0c7c..6c257792 100755
--- a/unrar/build/unrar.SlackBuild
+++ b/unrar/build/unrar.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright (c) 2004-2008 Eric Hameleers <alien@slackware.com>
+# Copyright (c) 2004-2009 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -39,8 +39,12 @@
# Added a man page (obtained from Debian).
# 3.7.8-1: 01/Feb/2008 by Eric Hameleers <alien@slackware.com>
# * New release.
+# 3.9.3-1: 22/may/2009 by Eric Hameleers <alien@slackware.com>
+# * New release.
+# 3.9.6-1: 15/nov/2009 by Eric Hameleers <alien@slackware.com>
+# * New release.
#
-# Run 'sh unrar.SlackBuild --cleanup' to build a Slackware package.
+# Run 'sh unrar.SlackBuild' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
# Install using 'installpkg'.
#
@@ -49,8 +53,7 @@
# Set initial variables:
PRGNAM=unrar
-VERSION=${VERSION:-3.7.8}
-ARCH=${ARCH:-i486}
+VERSION=${VERSION:-3.9.6}
BUILD=${BUILD:-1}
TAG=${TAG:-alien}
@@ -78,29 +81,26 @@ 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
+# 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 -m${MOPT}=i686"
+ 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"
;;
- athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
- ;;
esac
# Create working directories:
@@ -141,13 +141,8 @@ echo "|| $PRGNAM-$VERSION"
echo "++"
cd $TMP/tmp-$PRGNAM
-
echo "Extracting the source archive(s) for $PRGNAM..."
-if `file ${SOURCE} | grep -q ": bzip2"`; then
- tar -xjvf ${SOURCE}
-elif `file ${SOURCE} | grep -q ": gzip"`; then
- tar -xzvf ${SOURCE}
-fi
+tar -xvf ${SOURCE}
chown -R root:root *
chmod -R u+w,go+r-w,a-s *
@@ -161,9 +156,9 @@ CFLAGS="$SLKCFLAGS" \
make -f makefile.unix unrar lib 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
# Install to the package dir:
-mkdir -p $PKG/usr/{bin,lib}
+mkdir -p $PKG/usr/{bin,lib${LIBDIRSUFFIX}}
cp -a unrar $PKG/usr/bin/
-cp -a libunrar.so $PKG/usr/lib/
+cp -a libunrar.so $PKG/usr/lib${LIBDIRSUFFIX}/
# Add a man page:
mkdir -p $PKG/usr/man/man1
@@ -176,10 +171,8 @@ cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
find $PKG/usr/doc -type f -exec chmod 0644 {} \; || true
# Strip binaries:
-cd $PKG
-find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-cd -
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
# Add a package description:
mkdir -p $PKG/install
@@ -193,8 +186,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