[Xfce4-commits] <xfce4-diskperf-plugin:master> Compile the plugin as a module.

Landry Breuil noreply at xfce.org
Mon Apr 9 19:06:21 CEST 2012


Updating branch refs/heads/master
         to e3097b9c60e397ed675213b4f981b752d9368b2b (commit)
       from b3c80d817eef1165d5fecceaa13ea0159092a77f (commit)

commit e3097b9c60e397ed675213b4f981b752d9368b2b
Author: Landry Breuil <landry at xfce.org>
Date:   Mon Apr 9 17:22:31 2012 +0200

    Compile the plugin as a module.
    
    - Switch from _PROGRAMS to _LTLIBRARIES
    - Register the plugin as not external
    - Rename .desktop.in.in to .desktop.in
    - install plugin/desktop file in the correct panel/plugins dir

 panel-plugin/Makefile.am                           |   41 +++++++++-----------
 ...{diskperf.desktop.in.in => diskperf.desktop.in} |    2 +-
 panel-plugin/main.c                                |    2 +-
 3 files changed, 20 insertions(+), 25 deletions(-)

diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 79b2796..00e2416 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -4,52 +4,47 @@ INCLUDES =							\
 	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"
 
 #
-# Diskpef Plugin
+# Diskperf Plugin
 #
-plugindir =							\
-	$(libexecdir)/xfce4/panel-plugins
+plugindir = $(libexecdir)/xfce4/panel/plugins
 
-plugin_PROGRAMS =						\
-	xfce4-diskperf-plugin
+plugin_LTLIBRARIES = libdiskperf.la
 
-xfce4_diskperf_plugin_SOURCES =					\
+libdiskperf_la_SOURCES =					\
 	main.c							\
 	config_gui.c						\
 	config_gui.h						\
 	devperf.c						\
 	devperf.h
 
-xfce4_diskperf_plugin_CFLAGS =					\
+libdiskperf_la_CFLAGS =						\
 	$(LIBXFCE4PANEL_CFLAGS)					\
 	$(LIBXFCE4UI_CFLAGS)
 
-xfce4_diskperf_plugin_LDADD=					\
+libdiskperf_la_LIBADD=						\
 	$(LIBM)							\
 	$(LIBXFCE4PANEL_LIBS)					\
 	$(LIBXFCE4UI_LIBS)
 
+libdiskperf_la_LDFLAGS = \
+	-avoid-version \
+	-module \
+	-no-undefined \
+	-export-symbols-regex '^xfce_panel_module_(preinit|init|construct)' \
+	$(PLATFORM_LDFLAGS)
+
 #
 # Desktop file
 #
-desktopdir = $(datadir)/xfce4/panel-plugins
-desktop_in_in_files = diskperf.desktop.in.in
-
-desktop_in_files =						\
-	$(desktop_in_in_files:.desktop.in.in=.desktop.in)
-
-%.desktop.in: %.desktop.in.in
-	sed -e "s,\@libexecdir\@,$(libexecdir),g" < $< > $@
+desktopdir = $(datadir)/xfce4/panel/plugins
+desktop_in_files = diskperf.desktop.in
 
-desktop_DATA =							\
-	$(desktop_in_files:.desktop.in=.desktop)
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
 @INTLTOOL_DESKTOP_RULE@
 
-EXTRA_DIST = 							\
-	$(desktop_in_in_files)
+EXTRA_DIST = $(desktop_in_files)
 
-DISTCLEANFILES =						\
-	$(desktop_DATA)						\
-	$(desktop_in_files)
+DISTCLEANFILES = $(desktop_DATA)
 
 # vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/panel-plugin/diskperf.desktop.in.in b/panel-plugin/diskperf.desktop.in
similarity index 66%
rename from panel-plugin/diskperf.desktop.in.in
rename to panel-plugin/diskperf.desktop.in
index 7669b00..1f2778b 100644
--- a/panel-plugin/diskperf.desktop.in.in
+++ b/panel-plugin/diskperf.desktop.in
@@ -4,5 +4,5 @@ Encoding=UTF-8
 _Name=Disk Performance Monitor
 _Comment=Show disk performance
 Icon=gtk-harddisk
-X-XFCE-Exec=@libexecdir@/xfce4/panel-plugins/xfce4-diskperf-plugin
+X-XFCE-Exec=diskperf
 
diff --git a/panel-plugin/main.c b/panel-plugin/main.c
index 0822ed8..5afcdbe 100644
--- a/panel-plugin/main.c
+++ b/panel-plugin/main.c
@@ -1172,4 +1172,4 @@ static void diskperf_construct (XfcePanelPlugin *plugin)
     SetTimer (diskperf);
 }
 
-XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (diskperf_construct);
+XFCE_PANEL_PLUGIN_REGISTER (diskperf_construct);


More information about the Xfce4-commits mailing list