aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2017-02-10 00:47:32 +0100
committerMihai Moldovan <ionic@ionic.de>2017-02-10 00:47:32 +0100
commit0a7df07702c6f56b708a22c666077a3b90c7542c (patch)
tree760707ab65b4e2ab39ac744d740af03f854dd9b0
parent0a314adfa63669155299c77e479ed68c349643bd (diff)
parent99c130f153b88fb9c779b0fd1f91d78cc4e75d01 (diff)
downloadnx-libs-0a7df07702c6f56b708a22c666077a3b90c7542c.tar.gz
nx-libs-0a7df07702c6f56b708a22c666077a3b90c7542c.tar.bz2
nx-libs-0a7df07702c6f56b708a22c666077a3b90c7542c.zip
Merge branch 'sunweaver-pr/use-rpath-for-nxagent' into 3.6.x
Attributes GH PR #313: https://github.com/ArcticaProject/nx-libs/pull/313
-rw-r--r--Makefile35
-rw-r--r--bin/nxagent.in5
-rw-r--r--bin/nxproxy.in4
-rw-r--r--debian/nxagent.install2
-rw-r--r--debian/patches/016_nx-X11_install-location.debian.patch24
-rwxr-xr-xdebian/rules2
-rw-r--r--nx-X11/config/cf/Imake.tmpl4
-rw-r--r--nx-X11/config/cf/X11.rules4
-rw-r--r--nx-X11/config/cf/lnxLib.rules2
-rw-r--r--nx-libs.spec6
10 files changed, 48 insertions, 40 deletions
diff --git a/Makefile b/Makefile
index d31c7d3f5..e78f45c1b 100644
--- a/Makefile
+++ b/Makefile
@@ -9,14 +9,15 @@ COPY_DEREFERENCED=cp -RH
RM_FILE=rm -f
RM_DIR=rmdir -p --ignore-fail-on-non-empty
-ETCDIR_NX ?= /etc/nxagent
-PREFIX ?= /usr/local
-BINDIR ?= $(PREFIX)/bin
-LIBDIR ?= $(PREFIX)/lib
-USRLIBDIR ?= $(LIBDIR)
-INCLUDEDIR ?= $(PREFIX)/include
-NXLIBDIR ?= $(LIBDIR)/nx
-CONFIGURE ?= ./configure
+ETCDIR_NX ?= /etc/nxagent
+PREFIX ?= /usr/local
+BINDIR ?= $(PREFIX)/bin
+LIBDIR ?= $(PREFIX)/lib
+SHLIBDIR ?= $(LIBDIR)
+NXLIBDIR ?= $(SHLIBDIR)/nx
+USRLIBDIR ?= $(NXLIBDIR)/X11
+INCLUDEDIR ?= $(PREFIX)/include
+CONFIGURE ?= ./configure
NX_VERSION_MAJOR=$(shell ./version.sh 1)
NX_VERSION_MINOR=$(shell ./version.sh 2)
@@ -71,7 +72,7 @@ build-full:
cd nxcompshad && autoconf && (${CONFIGURE}) && ${MAKE}
- cd nx-X11 && ${MAKE} World
+ cd nx-X11 && ${MAKE} World USRLIBDIR=$(USRLIBDIR) SHLIBDIR=$(SHLIBDIR)
cd nxproxy && autoconf && (${CONFIGURE}) && ${MAKE}
@@ -143,13 +144,13 @@ install-full:
cp -a "$$(string_rep "$$libpath" "$$libfile" "$$link")" "$$(string_rep "$$libdir" exports .build-exports)"; \
done;
+ $(INSTALL_DIR) $(DESTDIR)$(SHLIBDIR)
+ $(COPY_SYMLINK) nx-X11/.build-exports/lib/libNX_X11.so $(DESTDIR)$(SHLIBDIR)/
+ $(COPY_SYMLINK) nx-X11/.build-exports/lib/libNX_X11.so.6 $(DESTDIR)$(SHLIBDIR)/
+ $(COPY_DEREFERENCED) nx-X11/.build-exports/lib/libNX_X11.so.6.2 $(DESTDIR)$(SHLIBDIR)/
$(INSTALL_DIR) $(DESTDIR)$(USRLIBDIR)
- $(COPY_SYMLINK) nx-X11/.build-exports/lib/libNX_X11.so $(DESTDIR)$(USRLIBDIR)/
- $(COPY_SYMLINK) nx-X11/.build-exports/lib/libNX_X11.so.6 $(DESTDIR)$(USRLIBDIR)/
- $(COPY_DEREFERENCED) nx-X11/.build-exports/lib/libNX_X11.so.6.2 $(DESTDIR)$(USRLIBDIR)/
- $(INSTALL_DIR) $(DESTDIR)$(USRLIBDIR)/nx-X11
- $(INSTALL_SYMLINK) ../libNX_X11.so.6 $(DESTDIR)$(USRLIBDIR)/nx-X11/libX11.so.6
- $(INSTALL_SYMLINK) ../libNX_X11.so.6.2 $(DESTDIR)$(USRLIBDIR)/nx-X11/libX11.so.6.2
+ $(INSTALL_SYMLINK) ../../libNX_X11.so.6 $(DESTDIR)$(USRLIBDIR)/libX11.so.6
+ $(INSTALL_SYMLINK) ../../libNX_X11.so.6.2 $(DESTDIR)$(USRLIBDIR)/libX11.so.6.2
. replace.sh; set -x; find nx-X11/.build-exports/include/{nx*,GL} -type d | \
while read dirname; do \
@@ -185,14 +186,14 @@ uninstall-lite:
$(RM_DIR) $(DESTDIR)$(NXLIBDIR)/bin/
$(RM_FILE) $(DESTDIR)$(PREFIX)/share/man/man1/*.1
$(RM_FILE) $(DESTDIR)$(PREFIX)/share/nx/VERSION.nxproxy
- $(RM_DIR) $(DESTDIR)$(NXLIBDIR)/share/nx/
+ $(RM_DIR) $(DESTDIR)$(PREFIX)/share/nx/
uninstall-full:
for f in nxagent; do \
$(RM_FILE) $(DESTDIR)$(BINDIR)/$$f; done
$(RM_FILE) $(DESTDIR)$(PREFIX)/share/nx/VERSION.nxagent
- $(RM_DIR) $(DESTDIR)$(NXLIBDIR)/share/nx/
+ $(RM_DIR) $(DESTDIR)$(PREFIX)/share/nx/
if test -d nx-X11; then \
if test -f nxcompshad/Makefile; then ${MAKE} -C nxcompshad $@; fi; \
diff --git a/bin/nxagent.in b/bin/nxagent.in
index 86603d549..3a9dfc649 100644
--- a/bin/nxagent.in
+++ b/bin/nxagent.in
@@ -15,11 +15,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
-NX_LIBS=@@NXLIBDIR@@
+NX_LIBDIR=@@NXLIBDIR@@
# make sure nxagent starts properly with pam_tmpdir.so being in use
NX_TEMP=${NX_TEMP:-/tmp}
export NX_TEMP
-export LD_LIBRARY_PATH=@@NXLIBDIR@@-X11/
-exec $NX_LIBS/bin/${NXAPP:-"nxagent"} "$@"
+exec $NX_LIBDIR/bin/${NXAPP:-"nxagent"} "$@"
diff --git a/bin/nxproxy.in b/bin/nxproxy.in
index d21388d18..0866d25ac 100644
--- a/bin/nxproxy.in
+++ b/bin/nxproxy.in
@@ -15,10 +15,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
-NX_LIBS=@@NXLIBDIR@@
+NX_LIBDIR=@@NXLIBDIR@@
# make sure nxagent starts properly with pam_tmpdir.so being in use
NX_TEMP=${NX_TEMP:-/tmp}
export NX_TEMP
-exec $NX_LIBS/bin/${NXAPP:="nxproxy"} "$@"
+exec $NX_LIBDIR/bin/${NXAPP:="nxproxy"} "$@"
diff --git a/debian/nxagent.install b/debian/nxagent.install
index 75e72fcde..5f6a9de35 100644
--- a/debian/nxagent.install
+++ b/debian/nxagent.install
@@ -4,7 +4,7 @@ usr/share/nx/rgb
usr/share/nx/VERSION.nxagent
usr/share/man/man1/nxagent.1*
usr/lib/*/nx/bin/nxagent
-usr/lib/*/nx-X11/
+usr/lib/*/nx/X11/
usr/bin/nxagent
usr/share/pixmaps/nxagent.xpm
etc/nxagent/nxagent.keyboard
diff --git a/debian/patches/016_nx-X11_install-location.debian.patch b/debian/patches/016_nx-X11_install-location.debian.patch
index ee5bb66cf..c758a3cfe 100644
--- a/debian/patches/016_nx-X11_install-location.debian.patch
+++ b/debian/patches/016_nx-X11_install-location.debian.patch
@@ -1,21 +1,29 @@
Description: FHS adaptation for Debian packaging
- On Debian, NX libraries and binaries are installed to
- /usr/lib/nx.
+Abstract:
+ On Debian, binaries are installed to /usr/<lib>/nx.
+ .
+ Also, a fake-libX11 library symlink is placed into
+ /usr/<lib>/nx/X11.
+ .
+ The given paths will be overridden by the Debian packaging
+ and modified into multi-arch paths.
+
Forwarded: not-needed
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
-Last-Update: 2012-12-31
+Last-Update: 2017-02-08
+
--- a/nx-X11/config/cf/Imake.tmpl
+++ b/nx-X11/config/cf/Imake.tmpl
-@@ -749,7 +749,7 @@
+@@ -730,7 +730,7 @@
#define AlternateUsrLibDir YES
#endif
#else
--#define UsrLibDir Concat4(/usr/local,/,LibDirName,/nx)
-+#define UsrLibDir Concat4(/usr,/,LibDirName,/nx)
+-#define UsrLibDir Concat4(/usr/local,/,LibDirName,/nx/X11)
++#define UsrLibDir Concat4(/usr,/,LibDirName,/nx/X11)
#ifndef AlternateUsrLibDir
#define AlternateUsrLibDir NO
#endif
-@@ -767,7 +767,7 @@
+@@ -748,7 +748,7 @@
#define AlternateUsrDataDir YES
#endif
#else
@@ -26,7 +34,7 @@ Last-Update: 2012-12-31
#endif
--- a/nx-X11/config/cf/site.def
+++ b/nx-X11/config/cf/site.def
-@@ -72,7 +72,7 @@
+@@ -69,7 +69,7 @@
#ifdef AfterVendorCF
#ifndef ProjectRoot
diff --git a/debian/rules b/debian/rules
index d30574c07..180de6984 100755
--- a/debian/rules
+++ b/debian/rules
@@ -51,7 +51,7 @@ override_dh_auto_install:
override_dh_auto_build:
- PREFIX=/usr dh_auto_build --parallel -- CDEBUGFLAGS="$(CPPFLAGS) $(CFLAGS)" LOCAL_LDFLAGS="$(LDFLAGS)" SHLIBGLOBALSFLAGS='$(filter-out -pie,$(LDFLAGS))' SHLIBDIR="$(LIBDIR)"
+ PREFIX=/usr dh_auto_build --parallel -- CDEBUGFLAGS="$(CPPFLAGS) $(CFLAGS)" LOCAL_LDFLAGS="$(LDFLAGS)" SHLIBGLOBALSFLAGS='$(filter-out -pie,$(LDFLAGS))'
override_dh_strip:
dh_strip -plibnx-x11-6 --dbg-package=libnx-x11-6-dbg
diff --git a/nx-X11/config/cf/Imake.tmpl b/nx-X11/config/cf/Imake.tmpl
index 93b659a0d..ba97b3b4c 100644
--- a/nx-X11/config/cf/Imake.tmpl
+++ b/nx-X11/config/cf/Imake.tmpl
@@ -723,12 +723,12 @@ TCLIBDIR = TclLibDir
#ifndef UsrLibDir
#ifdef ProjectRoot
-#define UsrLibDir Concat4(ProjectRoot,/,LibDirName,/nx)
+#define UsrLibDir Concat4(ProjectRoot,/,LibDirName,/nx/X11)
#ifndef AlternateUsrLibDir
#define AlternateUsrLibDir YES
#endif
#else
-#define UsrLibDir Concat4(/usr/local,/,LibDirName,/nx)
+#define UsrLibDir Concat4(/usr/local,/,LibDirName,/nx/X11)
#ifndef AlternateUsrLibDir
#define AlternateUsrLibDir NO
#endif
diff --git a/nx-X11/config/cf/X11.rules b/nx-X11/config/cf/X11.rules
index 0f6a67ed4..af3473c3a 100644
--- a/nx-X11/config/cf/X11.rules
+++ b/nx-X11/config/cf/X11.rules
@@ -39,9 +39,9 @@
#endif
#ifdef X11ProjectRoot
-# define XUsrLibDirPath $(USRLIBDIR)/nx:$(XPROJECTROOT)
+# define XUsrLibDirPath $(USRLIBDIR):$(XPROJECTROOT)
#else
-# define XUsrLibDirPath $(USRLIBDIR)/nx
+# define XUsrLibDirPath $(USRLIBDIR)
#endif
#ifdef UsrLibDirPath
# undef UsrLibDirPath
diff --git a/nx-X11/config/cf/lnxLib.rules b/nx-X11/config/cf/lnxLib.rules
index 166e896f1..e415db8f1 100644
--- a/nx-X11/config/cf/lnxLib.rules
+++ b/nx-X11/config/cf/lnxLib.rules
@@ -9,7 +9,7 @@
#endif
#ifndef UseRpath
-#define UseRpath NO
+#define UseRpath YES
#endif
#if UseElfFormat
diff --git a/nx-libs.spec b/nx-libs.spec
index 8fb25bf07..4779885da 100644
--- a/nx-libs.spec
+++ b/nx-libs.spec
@@ -346,7 +346,7 @@ chmod a+x my_configure;
export SHLIBGLOBALSFLAGS="%{__global_ldflags}"
export LOCAL_LDFLAGS="%{__global_ldflags}"
export CDEBUGFLAGS="%{__global_cppflags} %{__global_cflags}"
-make %{?_smp_mflags} CONFIGURE="$PWD/my_configure" PREFIX=%{_prefix} LIBDIR=%{_libdir} SHLIBDIR=%{_libdir}
+make %{?_smp_mflags} CONFIGURE="$PWD/my_configure" PREFIX=%{_prefix} LIBDIR=%{_libdir}
%install
make install \
@@ -515,8 +515,8 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans
%{_bindir}/nxagent
%dir %{_libdir}/nx/bin
%{_libdir}/nx/bin/nxagent
-%dir %{_libdir}/nx-X11
-%{_libdir}/nx-X11/libX11.so*
+%dir %{_libdir}/nx/X11
+%{_libdir}/nx/X11/libX11.so*
%{_datadir}/pixmaps/nxagent.xpm
%dir %{_datadir}/nx
%{_datadir}/nx/rgb