[PATCH] Compile and install the ifcfg plugin proper



Hi,

it's a bad idea to make the ifcfg a shared library with a SONAME that is
installed into $(libdir).
The correct place for plugins is $(pkglibdir), linked with -module and
-avoid-version.
The attached patch addresses this.
It also contains a small fix for po/POTFILES.in. It seems
src/NetworkManager.c is missing, so "make check" fails.

Please review and apply.

Cheers,
Michael
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
Index: system-settings/plugins/ifcfg/Makefile.am
===================================================================
--- system-settings/plugins/ifcfg/Makefile.am	(Revision 3128)
+++ system-settings/plugins/ifcfg/Makefile.am	(Arbeitskopie)
@@ -1,5 +1,5 @@
 
-lib_LTLIBRARIES = libnm-settings-plugin-ifcfg.la
+pkglib_LTLIBRARIES = libnm-settings-plugin-ifcfg.la
 
 libnm_settings_plugin_ifcfg_la_SOURCES = \
 	shvar.c \
@@ -19,6 +19,7 @@
 	-I$(top_srcdir)/libnm-util \
 	-DSYSCONFDIR=\"$(sysconfdir)\"
 
+libnm_settings_plugin_ifcfg_la_LDFLAGS = -module -avoid-version
 libnm_settings_plugin_ifcfg_la_LIBADD = \
 	$(GLIB_LIBS) \
 	$(GMODULE_LIBS) \
Index: system-settings/src/main.c
===================================================================
--- system-settings/src/main.c	(Revision 3128)
+++ system-settings/src/main.c	(Arbeitskopie)
@@ -149,7 +149,7 @@
 			continue;
 
 		full_name = g_strdup_printf ("nm-settings-plugin-%s", *pname);
-		path = g_module_build_path (NULL, full_name);
+		path = g_module_build_path (PLUGINDIR, full_name);
 
 		plugin = g_module_open (path, G_MODULE_BIND_LOCAL);
 		if (!plugin) {
Index: system-settings/src/Makefile.am
===================================================================
--- system-settings/src/Makefile.am	(Revision 3128)
+++ system-settings/src/Makefile.am	(Arbeitskopie)
@@ -13,18 +13,19 @@
 	nm-system-config-interface.h
 
 nm_system_settings_CPPFLAGS = \
-	$(DBUS_CFLAGS)									\
-	$(GTHREAD_CFLAGS)								\
+	$(DBUS_CFLAGS) \
+	$(GTHREAD_CFLAGS) \
 	$(GMODULE_CFLAGS) \
-	-DDBUS_API_SUBJECT_TO_CHANGE						\
-	-DG_DISABLE_DEPRECATED							\
-	-DBINDIR=\"$(bindir)\"							\
-	-DSBINDIR=\"$(sbindir)\"							\
-	-DLIBEXECDIR=\"$(libexecdir)\"					\
-	-DDATADIR=\"$(datadir)\"							\
-	-DSYSCONFDIR=\"$(sysconfdir)\"					\
-	-DLOCALSTATEDIR=\"$(localstatedir)\"				\
-	-DGNOMELOCALEDIR=\"$(datadir)/locale\"
+	-DDBUS_API_SUBJECT_TO_CHANGE \
+	-DG_DISABLE_DEPRECATED	\
+	-DBINDIR=\"$(bindir)\" \
+	-DSBINDIR=\"$(sbindir)\" \
+	-DLIBEXECDIR=\"$(libexecdir)\" \
+	-DDATADIR=\"$(datadir)\" \
+	-DSYSCONFDIR=\"$(sysconfdir)\" \
+	-DLOCALSTATEDIR=\"$(localstatedir)\" \
+	-DGNOMELOCALEDIR=\"$(datadir)/locale\" \
+	-DPLUGINDIR=\"$(pkglibdir)\"
 
 nm_system_settings_LDADD = \
 	$(DBUS_LIBS) \
Index: src/ppp-manager/Makefile.am
===================================================================
--- src/ppp-manager/Makefile.am	(Revision 3128)
+++ src/ppp-manager/Makefile.am	(Arbeitskopie)
@@ -24,7 +24,7 @@
 	$(GLIB_LIBS) \
 	$(top_builddir)/src/marshallers/libmarshallers.la
 
-lib_LTLIBRARIES = nm-pppd-plugin.la
+pkglib_LTLIBRARIES = nm-pppd-plugin.la
 
 nm_pppd_plugin_la_SOURCES = \
 	nm-pppd-plugin.c \
Index: po/POTFILES.in
===================================================================
--- po/POTFILES.in	(Revision 3128)
+++ po/POTFILES.in	(Arbeitskopie)
@@ -2,3 +2,4 @@
 # List of source files containing translatable strings.
 # Please keep this file sorted alphabetically.
 src/nm-netlink-monitor.c
+src/NetworkManager.c

Attachment: signature.asc
Description: OpenPGP digital signature



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