[network-manager-iodine/lr/nm-1-2: 1/2] build: don't include the full path to a plugin by default



commit 9c5062206a253cbb4a0b3d9f4d5d1abb4f500588
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Fri Apr 22 12:29:33 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 |    5 +++++
 2 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 24174e0..19600b4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,13 +17,23 @@ nmvpnservicedir = $(NM_VPN_SERVICE_DIR)
 nmvpnservice_DATA = nm-iodine-service.name
 
 if WITH_LIBNM_GLIB
-nmvpnoldservicedir = $(sysconfdir)/NetworkManager/VPN
-nmvpnoldservice_DATA = nm-iodine-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-iodine-service.name.in \
+           >$(DESTDIR)$(sysconfdir)/NetworkManager/VPN/nm-iodine-service.name
+
+uninstall-hook:
+        rm -f $(DESTDIR)$(sysconfdir)/NetworkManager/VPN/nm-iodine-service.name
 endif
 
 nm-iodine-service.name: $(srcdir)/nm-iodine-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 = --enable-more-warnings=yes
diff --git a/configure.ac b/configure.ac
index 8596102..f19bd4b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,6 +48,8 @@ AM_CONDITIONAL(WITH_AUTHDLG, test x"$with_authdlg" != xno)
 AC_ARG_WITH(libnm-glib, AS_HELP_STRING([--without-libnm-glib], [Build NetworkManager-iodine 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-iodine
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
@@ -81,6 +83,9 @@ LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_2"
 NM_VPN_SERVICE_DIR=`$PKG_CONFIG pkg-config --define-variable prefix='\${prefix}' --variable vpnservicedir 
libnm`
 AC_SUBST(NM_VPN_SERVICE_DIR)
 
+test x"$enable_absolute_paths" = x"yes" && NM_PLUGIN_DIR='$(libdir)/NetworkManager/'
+AC_SUBST(NM_PLUGIN_DIR)
+
 NM_COMPILER_WARNINGS
 
 AC_CONFIG_FILES([


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