summaryrefslogtreecommitdiff
path: root/libraries/libsigc++/libsigc++.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libsigc++/libsigc++.SlackBuild')
-rwxr-xr-x[-rw-r--r--]libraries/libsigc++/libsigc++.SlackBuild48
1 files changed, 31 insertions, 17 deletions
diff --git a/libraries/libsigc++/libsigc++.SlackBuild b/libraries/libsigc++/libsigc++.SlackBuild
index fd49ea3c82..004b94934c 100644..100755
--- a/libraries/libsigc++/libsigc++.SlackBuild
+++ b/libraries/libsigc++/libsigc++.SlackBuild
@@ -26,17 +26,26 @@
# Modified by Michien van Wessem, <michiel@slackbuilds.org> - 20081029
PRGNAM=libsigc++
-VERSION=2.2.3
-ARCH=${ARCH:-i486}
+VERSION=2.2.7
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO examples"
+DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO"
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
@@ -47,16 +56,25 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-cd $TMP || exit 1
+cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1
-cd $PRGNAM-$VERSION || exit 1
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+rw,go-w+r .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -65,21 +83,17 @@ CXXFLAGS="$SLKCFLAGS" \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
--enable-static=no \
- --build=$ARCH-slackware-linux \
- || exit 1
+ --build=$ARCH-slackware-linux
-make || exit 1
-make install-strip DESTDIR=$PKG || exit 1
+make libdocdir=/usr/doc/$PRGNAM-$VERSION
+make install-strip libdocdir=/usr/doc/$PRGNAM-$VERSION DESTDIR=$PKG
-mkdir -p $PKG/usr/doc
-mv $PKG/usr/share/doc/libsigc-2.0/docs $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-rm -rf $PKG/usr/share # Remove empty directory
-rm -rf $PKG/usr/doc/$PRGNAM-$VERSION/images/ # Remove images
-rm -rf $PKG/usr/doc/$PRGNAM-$VERSION/reference # Remove API docs
-rm -f $PKG/usr/doc/$PRGNAM-$VERSION/index.html # Remove useless html file
+# Remove images, API docs, and useless html file
+rm -rf $PKG/usr/doc/$PRGNAM-$VERSION/{images,reference,index.html}
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc