summaryrefslogtreecommitdiffstats
path: root/source/a/bzip2
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/bzip2')
-rwxr-xr-xsource/a/bzip2/bzip2.SlackBuild28
-rw-r--r--source/a/bzip2/bzip2.pc11
-rw-r--r--source/a/bzip2/slack-desc8
3 files changed, 32 insertions, 15 deletions
diff --git a/source/a/bzip2/bzip2.SlackBuild b/source/a/bzip2/bzip2.SlackBuild
index 46b1b1ef9..ce0c7ea7c 100755
--- a/source/a/bzip2/bzip2.SlackBuild
+++ b/source/a/bzip2/bzip2.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Copyright 2005-2009, 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
@@ -20,22 +20,31 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PKGNAM=bzip2
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
SOLIB=1.0.6
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-bzip2
@@ -62,11 +71,13 @@ cp -a bzlib.h $PKG/usr/include
chown root:root $PKG/usr/include/bzlib.h
chmod 644 $PKG/usr/include/bzlib.h
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
-cp -a libbz2.a $PKG/usr/lib${LIBDIRSUFFIX}/libbz2.a
+#cp -a libbz2.a $PKG/usr/lib${LIBDIRSUFFIX}/libbz2.a
+#chmod 644 $PKG/usr/lib${LIBDIRSUFFIX}/libbz2.a
mkdir -p $PKG/lib${LIBDIRSUFFIX}
cp -a libbz2.so.$SOLIB $PKG/lib${LIBDIRSUFFIX}/libbz2.so.$SOLIB
-chmod 644 $PKG/usr/lib${LIBDIRSUFFIX}/libbz2.a
chmod 755 $PKG/lib${LIBDIRSUFFIX}/libbz2.so.$SOLIB
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
+cat $CWD/bzip2.pc | sed "s|libdir=|libdir=/usr/lib${LIBDIRSUFFIX}|g" > $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/bzip2.pc
mkdir -p $PKG/bin
cat bzip2-shared > $PKG/bin/bzip2
cat bzip2recover > $PKG/bin/bzip2recover
@@ -114,8 +125,3 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
makepkg -l y -c n $TMP/bzip2-$VERSION-$ARCH-$BUILD.txz
-# Clean up the extra stuff:
-if [ "$1" = "--cleanup" ]; then
- rm -rf $TMP/bzip2-$VERSION
- rm -rf $PKG
-fi
diff --git a/source/a/bzip2/bzip2.pc b/source/a/bzip2/bzip2.pc
new file mode 100644
index 000000000..ff40d8533
--- /dev/null
+++ b/source/a/bzip2/bzip2.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=/usr
+bindir=/usr/bin
+libdir=
+includedir=/usr/include
+
+Name: bzip2
+Description: A file compression library
+Version: 1.0.6
+Libs: -L${libdir} -lbz2
+Cflags: -I${includedir}
diff --git a/source/a/bzip2/slack-desc b/source/a/bzip2/slack-desc
index 8026e7553..8369decbf 100644
--- a/source/a/bzip2/slack-desc
+++ b/source/a/bzip2/slack-desc
@@ -1,15 +1,15 @@
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
bzip2: bzip2 (a block-sorting file compressor)
bzip2:
bzip2: Bzip2 compresses files using the Burrows-Wheeler block sorting text
-bzip2: compression algorithm, and Huffman coding. Compression is generally
+bzip2: compression algorithm, and Huffman coding. Compression is generally
bzip2: considerably better than that achieved by more conventional LZ77/LZ78-
bzip2: based compressors, and approaches the performance of the PPM family of
bzip2: statistical compressors.