From fc086b8bf24a909f2a401542cfa51ba8eaa5486a Mon Sep 17 00:00:00 2001 From: "Elvio Basello (HelLViS69)" Date: Sun, 17 Sep 2017 08:04:49 +0700 Subject: libraries/nx-libs: Update script. Signed-off-by: Willy Sudiarto Raharjo --- libraries/nx-libs/nx-libs.SlackBuild | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'libraries') 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 -- cgit v1.2.3