66 lines
2.5 KiB
Diff
66 lines
2.5 KiB
Diff
|
commit 75d67086a651a4c46a66c563c8e9618c3a4b2fe2
|
||
|
Author: Dominique Leuenberger <dimstar@opensuse.org>
|
||
|
Date: Mon Feb 11 14:00:52 2013 +0100
|
||
|
|
||
|
networkAgent: Allow NetworkManager to use a different libexecdir path
|
||
|
|
||
|
Introducing a --with-nmlibexecdir parameter to configure allows
|
||
|
distributions to split libexecdir for various packages.
|
||
|
|
||
|
Not specifying it results in no change in behaviour.
|
||
|
|
||
|
diff --git a/configure.ac b/configure.ac
|
||
|
index 0ed832d..d0895f3 100644
|
||
|
--- a/configure.ac
|
||
|
+++ b/configure.ac
|
||
|
@@ -181,6 +181,13 @@ AM_CONDITIONAL(USE_JHBUILD_WRAPPER_SCRIPT, test "x$enable_jhbuild_wrapper_script
|
||
|
BROWSER_PLUGIN_DIR="${BROWSER_PLUGIN_DIR:-"\${libdir}/mozilla/plugins"}"
|
||
|
AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the plugin to])
|
||
|
|
||
|
+AC_ARG_WITH(nmlibexecdir,
|
||
|
+ AS_HELP_STRING([--with-nmlibexecdir=DIR],
|
||
|
+ [Specify the location where NetworkManager installs its helpers [default=$(libexecdir)]]),
|
||
|
+ [nmlibexecdir="$withval"],
|
||
|
+ [nmlibexecdir="$libexecdir"])
|
||
|
+AC_SUBST(nmlibexecdir)
|
||
|
+
|
||
|
AC_CONFIG_FILES([
|
||
|
Makefile
|
||
|
data/Makefile
|
||
|
diff --git a/js/Makefile.am b/js/Makefile.am
|
||
|
index 323cd1b..5ae77be 100644
|
||
|
--- a/js/Makefile.am
|
||
|
+++ b/js/Makefile.am
|
||
|
@@ -12,6 +12,7 @@ misc/config.js: misc/config.js.in Makefile
|
||
|
-e "s|[@]datadir@|$(datadir)|g" \
|
||
|
-e "s|[@]libexecdir@|$(libexecdir)|g" \
|
||
|
-e "s|[@]sysconfdir@|$(sysconfdir)|g" \
|
||
|
+ -e "s|[@]nmlibexecdir@|$(nmlibexecdir)|g" \
|
||
|
$< > $@
|
||
|
|
||
|
jsdir = $(pkgdatadir)/js
|
||
|
diff --git a/js/misc/config.js.in b/js/misc/config.js.in
|
||
|
index 9769104..192299f 100644
|
||
|
--- a/js/misc/config.js.in
|
||
|
+++ b/js/misc/config.js.in
|
||
|
@@ -13,3 +13,6 @@ const LOCALEDIR = '@datadir@/locale';
|
||
|
/* other standard directories */
|
||
|
const LIBEXECDIR = '@libexecdir@';
|
||
|
const SYSCONFDIR = '@sysconfdir@';
|
||
|
+
|
||
|
+/* Some distros use different libexecdir for NM than for gnome-shell */
|
||
|
+const NMLIBEXECDIR = '@nmlibexecdir@';
|
||
|
diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js
|
||
|
index e214cd8..2602444 100644
|
||
|
--- a/js/ui/components/networkAgent.js
|
||
|
+++ b/js/ui/components/networkAgent.js
|
||
|
@@ -688,7 +688,7 @@ const NetworkAgent = new Lang.Class({
|
||
|
} catch(e) { } // ignore errors if key does not exist
|
||
|
let path = binary;
|
||
|
if (!GLib.path_is_absolute(path)) {
|
||
|
- path = GLib.build_filenamev([Config.LIBEXECDIR, path]);
|
||
|
+ path = GLib.build_filenamev([Config.NMLIBEXECDIR, path]);
|
||
|
}
|
||
|
|
||
|
if (GLib.file_test(path, GLib.FileTest.IS_EXECUTABLE))
|