summaryrefslogtreecommitdiff
path: root/libraries/libgexiv2/libgexiv2.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libgexiv2/libgexiv2.SlackBuild')
-rw-r--r--libraries/libgexiv2/libgexiv2.SlackBuild71
1 files changed, 71 insertions, 0 deletions
diff --git a/libraries/libgexiv2/libgexiv2.SlackBuild b/libraries/libgexiv2/libgexiv2.SlackBuild
new file mode 100644
index 0000000000..5c13ee76d4
--- /dev/null
+++ b/libraries/libgexiv2/libgexiv2.SlackBuild
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+# Brad Hermanson <apeitheo@gmail.com>
+
+PRGNAM=libgexiv2
+VERSION=0.3.1
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+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
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+# This doesn't really do much...
+./configure --prefix=/usr
+
+make \
+ CFLAGS="$SLKCFLAGS -g -pipe -fPIC -nostdlib" \
+ PREFIX=/usr \
+ LIB=lib${LIBDIRSUFFIX}
+make install \
+ PREFIX=/usr \
+ LIB=lib${LIBDIRSUFFIX} \
+ DESTDIR=$PKG
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING INSTALLING MAINTAINERS NEWS README THANKS \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+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}