summaryrefslogtreecommitdiff
path: root/libraries/nx-libs/nx-libs.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/nx-libs/nx-libs.SlackBuild')
-rw-r--r--libraries/nx-libs/nx-libs.SlackBuild41
1 files changed, 17 insertions, 24 deletions
diff --git a/libraries/nx-libs/nx-libs.SlackBuild b/libraries/nx-libs/nx-libs.SlackBuild
index f108790b33..0f4c934ccc 100644
--- a/libraries/nx-libs/nx-libs.SlackBuild
+++ b/libraries/nx-libs/nx-libs.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for nx-libs
# Copyright 2015 Elvio "HelLViS69" Basello <hellvis69@gmail.com>
+# Copyright 2019 Marcus Moeller <mmoeller@faircomputer.ch>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,13 +24,14 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=nx-libs
-VERSION=${VERSION:-3.5.0.32}
+VERSION=${VERSION:-3.5.99.20_1}
+SRCVERSION=$(echo $VERSION | tr _ - )
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -40,8 +42,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -59,9 +61,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION-full.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-$SRCVERSION
+tar xvf $CWD/$PRGNAM-$SRCVERSION-full.tar.gz
+cd $PRGNAM-$SRCVERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -69,25 +71,17 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-make
+# Fix man install dir
+sed -i "s|share/man|man|g" Makefile
-# Variables PREFIX, LIBDIR, NXLIBDIR, and X2GOLIBDIR are used by the top level
-# makefile. Variables prefix and libdir are used by makefiles in some of the
-# subdirectories.
-make install \
- PREFIX=/usr \
- LIBDIR=/usr/lib${LIBDIRSUFFIX} \
- NXLIBDIR=/usr/lib${LIBDIRSUFFIX}/nx \
- X2GOLIBDIR=/usr/lib${LIBDIRSUFFIX}/x2go \
- prefix=/usr \
- libdir=/usr/lib${LIBDIRSUFFIX} \
- DESTDIR=$PKG
+make CONFIGURE="./configure --libdir=/usr/lib${LIBDIRSUFFIX} --prefix=/usr --mandir=/usr/man" PREFIX=/usr LIBDIR=/usr/lib${LIBDIRSUFFIX}
-mv $PKG/usr/share/man/ $PKG/usr/
+make install PREFIX=/usr LIBDIR=/usr/lib${LIBDIRSUFFIX} DESTDIR=$PKG
-# Fix library search paths in scripts.
-sed -i "s#/usr/lib#/usr/lib${LIBDIRSUFFIX}#" $PKG/usr/bin/*
-sed -i "s#/usr/local/lib#/usr/local/lib${LIBDIRSUFFIX}#" $PKG/usr/bin/*
+# Cleanups: remove static libs/overlapping headers and fix permissions
+rm $PKG/usr/lib${LIBDIRSUFFIX}/*.a
+rm -fR $PKG/usr/include/GL
+chmod 0755 $PKG/usr/lib${LIBDIRSUFFIX}/lib*.so*
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -97,7 +91,6 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}