summaryrefslogtreecommitdiff
path: root/libraries/nx-libs
diff options
context:
space:
mode:
authorElvio Basello (HelLViS69) <hellvis69@gmail.com>2017-09-17 08:04:49 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-09-17 20:29:49 +0700
commitfc086b8bf24a909f2a401542cfa51ba8eaa5486a (patch)
treecde21a8f8ba299a8d6eba5926fb00d3ba49da139 /libraries/nx-libs
parent2fb1e87e9941d1aaed5b16ea51844d200e6e8be7 (diff)
downloadslackbuilds-fc086b8bf24a909f2a401542cfa51ba8eaa5486a.tar.gz
libraries/nx-libs: Update script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/nx-libs')
-rw-r--r--libraries/nx-libs/nx-libs.SlackBuild26
1 files changed, 17 insertions, 9 deletions
diff --git a/libraries/nx-libs/nx-libs.SlackBuild b/libraries/nx-libs/nx-libs.SlackBuild
index d63e07209c..f108790b33 100644
--- a/libraries/nx-libs/nx-libs.SlackBuild
+++ b/libraries/nx-libs/nx-libs.SlackBuild
@@ -70,16 +70,24 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
make
-make install DESTDIR=$PKG
-
-# Since there's no way to pass PREFIX=/usr to make, we need to edit package structure
-mkdir -p $PKG/usr/bin $PKG/usr/include $PKG/usr/lib${LIBDIRSUFFIX} $PKG/usr/share
-mv $PKG/usr/local/bin/* $PKG/usr/bin
-mv $PKG/usr/local/include/* $PKG/usr/include
-mv $PKG/usr/local/lib/* $PKG/usr/lib${LIBDIRSUFFIX}
-mv $PKG/usr/local/share/* $PKG/usr/share
+
+# 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
+
mv $PKG/usr/share/man/ $PKG/usr/
-rm -rf $PKG/usr/local
+
+# 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/*
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