diff options
-rw-r--r-- | libraries/nx-libs/nx-libs.SlackBuild | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/libraries/nx-libs/nx-libs.SlackBuild b/libraries/nx-libs/nx-libs.SlackBuild index d63e07209c1c..f108790b332e 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 |