summaryrefslogtreecommitdiffstats
path: root/libraries/liboop/liboop.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/liboop/liboop.SlackBuild')
-rw-r--r--libraries/liboop/liboop.SlackBuild37
1 files changed, 28 insertions, 9 deletions
diff --git a/libraries/liboop/liboop.SlackBuild b/libraries/liboop/liboop.SlackBuild
index a0ce62f6d0..cfe6c7cf28 100644
--- a/libraries/liboop/liboop.SlackBuild
+++ b/libraries/liboop/liboop.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for liboop
@@ -9,26 +9,36 @@
# Granted WTFPL, Version 2, as published by Sam Hocevar. See
# http://sam.zoy.org/wtfpl/COPYING for more details.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=liboop
-VERSION=${VERSION:-1.0}
+VERSION=${VERSION:-1.0.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) 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 "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -56,6 +66,12 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# Patch the configure etc so it can compile with Slackware's tcl.
+patch -p1 < $CWD/patches/tcl_dev.patch
+
+# Fool autotools so it won't complain and we can simple configure and make
+find . -exec touch -m {} +
+
# build including libwww adapter
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -69,7 +85,7 @@ CXXFLAGS="$SLKCFLAGS" \
--disable-static \
--build=$ARCH-slackware-linux
-make -j1
+make
make install DESTDIR=$PKG
( cd $PKG || exit 1
@@ -77,8 +93,11 @@ make install DESTDIR=$PKG
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a [A-Z][A-Z]* $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README$TAG
@@ -86,4 +105,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.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE