summaryrefslogtreecommitdiff
path: root/graphics/opengtl/opengtl.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/opengtl/opengtl.SlackBuild')
-rw-r--r--graphics/opengtl/opengtl.SlackBuild44
1 files changed, 27 insertions, 17 deletions
diff --git a/graphics/opengtl/opengtl.SlackBuild b/graphics/opengtl/opengtl.SlackBuild
index ccc1e45224..19e250d17d 100644
--- a/graphics/opengtl/opengtl.SlackBuild
+++ b/graphics/opengtl/opengtl.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for opengtl
-# Copyright 2008 Heinz Wiesinger <pprkut@liwjatan.at>
+# Copyright 2008-2010 Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,8 +22,8 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM=OpenGTL
-VERSION=0.9.4
+SRCNAM=OpenGTL
+VERSION=0.9.12
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -33,14 +33,17 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-PKGNAM=$(echo $PRGNAM | tr [:upper:] [:lower:])
+PRGNAM=$(echo $SRCNAM | tr [:upper:] [:lower:])
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
set -e
@@ -48,9 +51,9 @@ 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
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
+cd $SRCNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -58,23 +61,30 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-cmake \
- -DCMAKE_C_FLAGS="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
- -DCMAKE_INSTALL_PREFIX=/usr \
+mkdir build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+ ..
-make
-make install DESTDIR=$PKG
+ make
+ make install DESTDIR=$PKG
+cd -
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/$PKGNAM-$VERSION
-cp -a COPYING TODO $PKG/usr/doc/$PKGNAM-$VERSION
-cat $CWD/$PKGNAM.SlackBuild > $PKG/usr/doc/$PKGNAM-$VERSION/$PKGNAM.SlackBuild
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp COPYING $PKG/usr/doc/$PRGNAM-$VERSION/
+mv $PKG/usr/share/doc/OpenGTL/ $PKG/usr/doc/$PRGNAM-$VERSION/
+rm -rf $PKG/usr/share/doc
+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/$PKGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}