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



commit fc1c7a3e23539a972ebc6c3d31de6965c67047f6
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Wed Apr 20 19:14:52 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.
    
    (cherry picked from commit cad287305fa36290bae27fb021608ed177d92cc6)

 Makefile.am  |   16 +++++++++++++---
 configure.ac |    4 ++++
 2 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 3ab0552..4a50a44 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,8 +13,18 @@ nmvpnservicedir = $(NM_VPN_SERVICE_DIR)
 nmvpnservice_DATA = nm-libreswan-service.name
 
 if WITH_LIBNM_GLIB
-nmvpnoldservicedir = $(sysconfdir)/NetworkManager/VPN
-nmvpnoldservice_DATA = nm-libreswan-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-libreswan-service.name.in \
+           >$(DESTDIR)$(sysconfdir)/NetworkManager/VPN/nm-libreswan-service.name
+
+uninstall-hook:
+        rm -f $(DESTDIR)$(sysconfdir)/NetworkManager/VPN/nm-libreswan-service.name
 endif
 
 appdatadir = $(datadir)/appdata
@@ -24,7 +34,7 @@ appdata_in_files = appdata/network-manager-libreswan.appdata.xml.in
 
 nm-libreswan-service.name: $(srcdir)/nm-libreswan-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 04384a0..bf41661 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,6 +49,7 @@ AC_ARG_WITH(gnome, AS_HELP_STRING([--without-gnome], [Build NetworkManager-libre
 AM_CONDITIONAL(WITH_GNOME, test x"$with_gnome" != xno)
 AC_ARG_WITH(libnm-glib, AS_HELP_STRING([--without-libnm-glib], [Build NetworkManager-libreswan 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)]))
 
 dnl ensure that when the Automake generated makefile calls aclocal,
 dnl it honours the $ACLOCAL_FLAGS environment variable
@@ -90,6 +91,9 @@ if test x"$with_gnome" != xno; then
        fi
 fi
 
+test x"$enable_absolute_paths" = x"yes" && NM_PLUGIN_DIR='$(libdir)/NetworkManager/'
+AC_SUBST(NM_PLUGIN_DIR)
+
 dnl
 dnl Distribution version string
 dnl


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