[network-manager-openvpn] build: don't include the full path to a plugin by default



commit 8a391ad56c351d45cde0562ffac442f83571ac17
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Wed Apr 20 19:15:48 2016 +0200

    build: don't include the full path to a plugin by default
    
    Makes packagers a bit less sad. We always keep the full paths in /etc for
    compatibility.

 Makefile.am  |   16 +++++++++++++---
 configure.ac |    4 ++++
 2 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 99ef33c..3fd8e21 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,8 +13,18 @@ nmvpnservicedir = $(NM_VPN_SERVICE_DIR)
 nmvpnservice_DATA = nm-openvpn-service.name
 
 if WITH_LIBNM_GLIB
-nmvpnoldservicedir = $(sysconfdir)/NetworkManager/VPN
-nmvpnoldservice_DATA = nm-openvpn-service.name
+# Install a file with full path to plugins for an old gnome-shell
+# https://bugzilla.gnome.org/show_bug.cgi?id=693590
+install-data-hook:
+       mkdir -p $(DESTDIR)$(sysconfdir)/NetworkManager/VPN
+       sed -e "1s|^|# This file is obsoleted by a file in $(NM_VPN_SERVICE_DIR)\n\n|" \
+           -e 's|[ ]LIBEXECDIR[@]|$(libexecdir)|g' \
+           -e 's|[ ]PLUGINDIR[@]|$(libdir)/NetworkManager|g' \
+           <$(srcdir)/nm-openvpn-service.name.in \
+           >$(DESTDIR)$(sysconfdir)/NetworkManager/VPN/nm-openvpn-service.name
+
+uninstall-hook:
+        rm -f $(DESTDIR)$(sysconfdir)/NetworkManager/VPN/nm-openvpn-service.name
 endif
 
 appdatadir = $(datadir)/appdata
@@ -24,7 +34,7 @@ appdata_in_files = appdata/network-manager-openvpn.appdata.xml.in
 
 nm-openvpn-service.name: $(srcdir)/nm-openvpn-service.name.in
        sed -e 's|[ ]LIBEXECDIR[@]|$(libexecdir)|g' \
-           -e 's|[ ]PLUGINDIR[@]|$(libdir)/NetworkManager|g' \
+           -e 's|[ ]PLUGINDIR[@]/|@NM_PLUGIN_DIR@|g' \
            $^ >$@
 
 DISTCHECK_CONFIGURE_FLAGS = \
diff --git a/configure.ac b/configure.ac
index 5ee40fa..825c8b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,6 +54,7 @@ AC_ARG_WITH(gnome, AS_HELP_STRING([--without-gnome], [Build NetworkManager-openv
 AM_CONDITIONAL(WITH_GNOME, test x"$with_gnome" != xno)
 AC_ARG_WITH(libnm-glib, AS_HELP_STRING([--without-libnm-glib], [Build NetworkManager-openvpn without 
libnm-glib comatibility]))
 AM_CONDITIONAL(WITH_LIBNM_GLIB, test x"$with_libnm_glib" != xno)
+AC_ARG_ENABLE(absolute-paths, AS_HELP_STRING([--enable-absolute-paths], [Use absolute paths to in .name 
files. Useful for development. (default is no)]))
 
 GETTEXT_PACKAGE=NetworkManager-openvpn
 AC_SUBST(GETTEXT_PACKAGE)
@@ -94,6 +95,9 @@ AC_SUBST(NM_VPN_SERVICE_DIR)
 
 NM_COMPILER_WARNINGS
 
+test x"$enable_absolute_paths" = x"yes" && NM_PLUGIN_DIR='$(libdir)/NetworkManager/'
+AC_SUBST(NM_PLUGIN_DIR)
+
 dnl
 dnl Tests
 dnl


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]