Commit 6ffc9ee3 authored by Mihai Moldovan's avatar Mihai Moldovan
Browse files

x2goserver/bin/x2gopath.in: add and use support for NXLIBDIR; drop the lib-subdir detection.

parent f5a68741
......@@ -107,6 +107,8 @@ x2goserver (4.1.0.4-0x2go1.1) UNRELEASED; urgency=medium
- x2goserver/bin/x2gopath.in: switch to bash.
- x2goserver/bin/x2gopath.in: fix warning message to also include
SHAREDIR.
- x2goserver/bin/x2gopath.in: add and use support for NXLIBDIR; drop the
lib-subdir detection.
* debian/control:
+ Build-depend upon lsb-release for distro version detection.
* debian/x2goserver.manpages:
......
......@@ -24,6 +24,7 @@
typeset installed_prefix='@@PREFIX@@'
typeset installed_libdir='@@LIBDIR@@'
typeset installed_nxlibdir='@@NXLIBDIR@@'
typeset installed_sharedir='@@SHAREDIR@@'
typeset base="${BASH_SOURCE[0]%/*}"
......@@ -39,25 +40,19 @@ fi
typeset x2go_share_subdir="${installed_sharedir#${installed_prefix}}"
typeset x2go_lib_subdir="${installed_libdir#${installed_prefix}}"
typeset x2go_nxlib_subdir="${installed_nxlibdir#${installed_prefix}}"
if [ "${x2go_share_subdir}" = "${installed_sharedir}" ] || [ "${x2go_lib_subdir}" = "${installed_libdir}" ]; then
printf 'WARNING: X2Go Server was built with a SHAREDIR (%s) or LIBDIR (%s) not starting with PREFIX (%s). Such a setup will likely not work correctly.\n' "${installed_sharedir}" "${installed_libdir}" "${installed_prefix}" >&2
if [ "${x2go_share_subdir}" = "${installed_sharedir}" ] || [ "${x2go_lib_subdir}" = "${installed_libdir}" ] || [ "${x2go_nxlib_subdir}" = "${installed_nxlibdir}" ]; then
printf 'WARNING: X2Go Server was built with a SHAREDIR (%s), LIBDIR (%s) or NXLIBDIR (%s) not starting with PREFIX (%s). Such a setup will likely not work correctly.\n' "${installed_sharedir}" "${installed_libdir}" "${installed_nxlibdir}" "${installed_prefix}" >&2
fi
# Try to fetch the system library dir.
# Drop leading slashes.
typeset lib_subdir="$(sed -e 's#^/*##g' <<< "${x2go_lib_subdir}")"
# Extract first element - should be the library directory.
lib_subdir="${lib_subdir%%/*}"
# Distributions should not modify the following section, but rather build the package with their custom PREFIX, LIBDIR, SHAREDIR etc. values.
case "${1}" in
('base') printf '%s' "${base}";;
('lib'|'libexec') printf '%s' "${base}/${x2go_lib_subdir}";;
('share') printf '%s' "${base}/${x2go_share_subdir}";;
# Assume that X2Go Server and nx-libs share the same library subdir.
('nx-x11') printf '%s' "${base}/${lib_subdir}/nx/X11";;
('xinerama') printf '%s' "${base}/${lib_subdir}/nx/X11/Xinerama";;
('nx-x11') printf '%s' "${base}/${x2go_nxlib_subdir}/X11";;
('xinerama') printf '%s' "${base}/${x2go_nxlib_subdir}/X11/Xinerama";;
(*) exit 1;;
esac;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment