aboutsummaryrefslogtreecommitdiff
path: root/system/lbzip2/lbzip2.SlackBuild
diff options
context:
space:
mode:
authorErik Hanson <erik@slackbuilds.org>2010-05-13 00:40:50 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-13 00:40:50 +0200
commit5431c4f00376ebd04b43aba92e930b1e9c5b0f65 (patch)
tree0b6ce339135709779dca1155d6bdb5e10d890f24 /system/lbzip2/lbzip2.SlackBuild
parent06c4fd7a92c544c4eccd38cb659e8b01db103cce (diff)
system/lbzip2: Updated for version 0.20
Diffstat (limited to 'system/lbzip2/lbzip2.SlackBuild')
-rw-r--r--system/lbzip2/lbzip2.SlackBuild40
1 files changed, 33 insertions, 7 deletions
diff --git a/system/lbzip2/lbzip2.SlackBuild b/system/lbzip2/lbzip2.SlackBuild
index 189c09c398483..83c00f1e81aae 100644
--- a/system/lbzip2/lbzip2.SlackBuild
+++ b/system/lbzip2/lbzip2.SlackBuild
@@ -1,10 +1,29 @@
#!/bin/sh
-
+#
# Slackware build script for lbzip2
-# Written by Erik Hanson erik@slackbuilds.org
+#
+# Copyright 2009 Erik W. Hanson, Minneapolis, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=lbzip2
-VERSION=0.14
+VERSION=0.20
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -16,8 +35,13 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
set -eu
@@ -25,9 +49,9 @@ set -eu
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
+rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+cd $PRGNAM
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -36,7 +60,7 @@ find . \
-exec chmod 644 {} \;
# Swap in our CFLAGS
-sed -i "s/-O3/$SLKCFLAGS/" Makefile
+sed -i "s/-O2/$SLKCFLAGS/" Makefile
# Build
make
@@ -46,6 +70,8 @@ install -D -s lbzip2 $PKG/usr/bin/lbzip2
install -D lbzip2.1 $PKG/usr/man/man1/lbzip2.1
gzip -9 $PKG/usr/man/man1/lbzip2.1
+( cd $PKG/usr/bin ; ln -s lbzip2 lbunzip2 ; ln -s lbzip2 lbzcat )
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a ChangeLog GPL-2.0 GPL-3.0 README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -54,4 +80,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}