diff options
Diffstat (limited to 'system/lrzip/lrzip.SlackBuild')
-rw-r--r-- | system/lrzip/lrzip.SlackBuild | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/system/lrzip/lrzip.SlackBuild b/system/lrzip/lrzip.SlackBuild index 3b46fad477..947029d38f 100644 --- a/system/lrzip/lrzip.SlackBuild +++ b/system/lrzip/lrzip.SlackBuild @@ -5,11 +5,20 @@ # Written by Dave Margell <dmargell@gmail.com> PRGNAM=lrzip -VERSION=${VERSION:-0.44} -ARCH=${ARCH:-i486} +VERSION=${VERSION:-0.46} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$( uname -m ) ;; + esac +fi + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -17,13 +26,16 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" - SLKLDFLAGS=""; LIBDIRSUFFIX="" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" - SLKLDFLAGS=""; LIBDIRSUFFIX="" + LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" - SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi set -e @@ -41,7 +53,6 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -LDFLAGS="$SLKLDFLAGS" \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -53,13 +64,15 @@ CXXFLAGS="$SLKCFLAGS" \ make make install DESTDIR=$PKG +# Fix some bad symlinks. +rm -f $PKG/usr/bin/{lrunzip,lrzuntar} +ln -sf lrzip $PKG/usr/bin/lrunzip +ln -sf lrztar $PKG/usr/bin/lrzuntar + find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -) +find $PKG/usr/man -type f -exec gzip -9 {} \; # Docs are already in place. Just add our SlackBuild. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION |