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



commit 3abfee943c2f180a518f87b6e4220eea46e10781
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Wed Apr 20 19:15:25 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 e4b99bb28f84b39cb0468abdcfd20d81ed2d4c62)

 Makefile.am  |   16 +++++++++++++---
 configure.ac |    4 ++++
 2 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index efe21df..72de72e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,8 +17,18 @@ nmvpnservicedir = $(NM_VPN_SERVICE_DIR)
 nmvpnservice_DATA = nm-openconnect-service.name
 
 if WITH_LIBNM_GLIB
-nmvpnoldservicedir = $(sysconfdir)/NetworkManager/VPN
-nmvpnoldservice_DATA = nm-openconnect-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-openconnect-service.name.in \
+           >$(DESTDIR)$(sysconfdir)/NetworkManager/VPN/nm-openconnect-service.name
+
+uninstall-hook:
+        rm -f $(DESTDIR)$(sysconfdir)/NetworkManager/VPN/nm-openconnect-service.name
 endif
 
 appdatadir = $(datadir)/appdata
@@ -28,7 +38,7 @@ appdata_in_files = appdata/network-manager-openconnect.appdata.xml.in
 
 nm-openconnect-service.name: $(srcdir)/nm-openconnect-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 a0ae1fd..711b52c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,6 +47,7 @@ AM_CONDITIONAL(WITH_GNOME, test x"$with_gnome" != xno)
 
 AC_ARG_WITH(libnm-glib, AS_HELP_STRING([--without-libnm-glib], [Build NetworkManager-openconnect 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)]))
 
 AC_ARG_WITH(authdlg, AS_HELP_STRING([--without-authdlg], [Build NetworkManager-openconnect without 
authentication dialog]))
 AM_CONDITIONAL(WITH_AUTHDLG, test x"$with_authdlg" != xno)
@@ -82,6 +83,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]