[Xfce4-commits] [panel-plugins/xfce4-netload-plugin] 01/01: Build plugin as a module

noreply at xfce.org noreply at xfce.org
Sun Nov 2 16:26:15 CET 2014


This is an automated email from the git hooks/post-receive script.

mmassonnet pushed a commit to branch master
in repository panel-plugins/xfce4-netload-plugin.

commit 1a73b511b8b4d59145b07b561fe015e6cc327522
Author: Mike Massonnet <m8t at gandi.net>
Date:   Sun Nov 2 16:26:08 2014 +0100

    Build plugin as a module
---
 panel-plugin/Makefile.am           |   23 +++++++++++++++--------
 panel-plugin/netload.c             |    2 +-
 panel-plugin/netload.desktop.in.in |    3 ++-
 3 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 92e1d26..eeef70a 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -1,9 +1,9 @@
-plugindir = $(libexecdir)/xfce4/panel-plugins
-plugin_PROGRAMS = xfce4-netload-plugin
+plugindir = $(libdir)/xfce4/panel-plugins
+plugin_LTLIBRARIES = libnetload.la
 
 LIBS = @LIBS@ @SOLLIBS@
 
-xfce4_netload_plugin_SOURCES =						\
+libnetload_la_SOURCES =							\
 	netload.c							\
 	monitor-label.c							\
 	monitor-label.h							\
@@ -16,14 +16,21 @@ xfce4_netload_plugin_SOURCES =						\
 	global.h							\
 	slurm.h
 
-xfce4_netload_plugin_CFLAGS =						\
+libnetload_la_CFLAGS =							\
 	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"				\
-	@LIBXFCE4PANEL_CFLAGS@				\
+	@LIBXFCE4PANEL_CFLAGS@						\
 	@LIBXFCE4UI_CFLAGS@
 
-xfce4_netload_plugin_LDADD =						\
-	@SOLLIBS@                                   			\
-	@LIBXFCE4PANEL_LIBS@                                   			\
+libnetload_la_LDFLAGS =							\
+	-avoid-version							\
+	-module								\
+	-no-undefined							\
+	-export-symbols-regex '^xfce_panel_module_(preinit|init|construct)' \
+	$(PLATFORM_LDFLAGS)
+
+libnetload_la_LIBADD =							\
+	@SOLLIBS@							\
+	@LIBXFCE4PANEL_LIBS@						\
 	@LIBXFCE4UI_LIBS@
 
 # .desktop file
diff --git a/panel-plugin/netload.c b/panel-plugin/netload.c
index 0ec0148..79d6bdb 100644
--- a/panel-plugin/netload.c
+++ b/panel-plugin/netload.c
@@ -1271,4 +1271,4 @@ static void netload_construct (XfcePanelPlugin *plugin)
     run_update( global );
 }
 
-XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (netload_construct);
+XFCE_PANEL_PLUGIN_REGISTER (netload_construct);
diff --git a/panel-plugin/netload.desktop.in.in b/panel-plugin/netload.desktop.in.in
index 6e5e57f..3a461f2 100644
--- a/panel-plugin/netload.desktop.in.in
+++ b/panel-plugin/netload.desktop.in.in
@@ -4,5 +4,6 @@ Encoding=UTF-8
 _Name=Network Monitor
 _Comment=Show network traffic
 Icon=xfce4-netload-plugin
-X-XFCE-Exec=@PLUGIN_PATH@/xfce4-netload-plugin
+X-XFCE-Module=netload
+X-XFCE-Internal=FALSE
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list