summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/chmlib/chmlib.SlackBuild24
1 files changed, 14 insertions, 10 deletions
diff --git a/libraries/chmlib/chmlib.SlackBuild b/libraries/chmlib/chmlib.SlackBuild
index fbb4456164..83329d28ff 100644
--- a/libraries/chmlib/chmlib.SlackBuild
+++ b/libraries/chmlib/chmlib.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for chmlib
-# Copyright 2007 Robby Workman - http://rlworkman.net
+# Copyright 2007-2009 Robby Workman Northport, Alabama, USA
# All rights reserved.
# Redistribution and use of this script, with or without modification, is
@@ -25,8 +25,9 @@
PRGNAM=chmlib
VERSION=0.39
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -36,6 +37,8 @@ if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
fi
set -e
@@ -46,7 +49,6 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
-
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -60,21 +62,23 @@ CXXFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--disable-static \
- --build=$ARCH-slackware-linux \
- --host=$ARCH-slackware-linux
+ --enable-examples \
+ --build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
-rmdir $PKG/usr/bin # Kill unused directory
-
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ 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
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING NEWS README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING NEWS README \
+ $PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc