summaryrefslogtreecommitdiff
path: root/system/gxemul/gxemul.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/gxemul/gxemul.SlackBuild')
-rw-r--r--system/gxemul/gxemul.SlackBuild33
1 files changed, 24 insertions, 9 deletions
diff --git a/system/gxemul/gxemul.SlackBuild b/system/gxemul/gxemul.SlackBuild
index 2acbd43e79..790356398d 100644
--- a/system/gxemul/gxemul.SlackBuild
+++ b/system/gxemul/gxemul.SlackBuild
@@ -1,9 +1,11 @@
#!/bin/sh
+
# Slackware build script for GXemul
+
# Written by Aleksandar Samardzic <asamardzic@gmail.com>
PRGNAM=gxemul
-VERSION=${VERSION:-0.4.7}
+VERSION=${VERSION:-0.4.7.2}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -15,10 +17,13 @@ OUTPUT=${OUTPUT:-/tmp}
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
@@ -36,25 +41,35 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" ./configure
-make
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure
+make
mkdir -p $PKG/usr/bin $PKG/usr/man/man1
install -m 0755 gxemul $PKG/usr/bin
install -m 0644 man/gxemul.1 $PKG/usr/man/man1
-strip --strip-unneeded $PKG/usr/bin/gxemul
+( cd $PKG
+ 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
+)
-gzip -9 $PKG/usr/man/man1/gxemul.1
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/html
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
-install -m 0644 HISTORY LICENSE README RELEASE.html TODO \
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ HISTORY LICENSE README RELEASE.html TODO \
$PKG/usr/doc/$PRGNAM-$VERSION
-install -m 0644 doc/* $PKG/usr/doc/$PRGNAM-$VERSION/html
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.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}