[Xfce4-commits] <xfce4-verve-plugin:master> Build the plugin as a module
Landry Breuil
noreply at xfce.org
Sun Dec 30 18:52:05 CET 2012
Updating branch refs/heads/master
to f7b923d980e3004c634750d6c2fedeb73f10b51e (commit)
from ba3167019ae25cb340c36b676f038ec73bb47d98 (commit)
commit f7b923d980e3004c634750d6c2fedeb73f10b51e
Author: Landry Breuil <landry at xfce.org>
Date: Sun Dec 30 18:50:07 2012 +0100
Build the plugin as a module
panel-plugin/Makefile.am | 45 +++++++++----------
panel-plugin/verve-plugin.c | 2 +-
...desktop.in.in => xfce4-verve-plugin.desktop.in} | 4 +-
3 files changed, 24 insertions(+), 27 deletions(-)
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 69fb4bd..5ac7b84 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -1,9 +1,8 @@
-plugindir = $(libexecdir)/xfce4/panel-plugins
+plugindir = $(libexecdir)/xfce4/panel/plugins
-plugin_PROGRAMS = \
- xfce4-verve-plugin
+plugin_LTLIBRARIES = libverve.la
-xfce4_verve_plugin_SOURCES = \
+libverve_la_SOURCES = \
verve-plugin.c \
verve.c \
verve-history.c \
@@ -12,7 +11,7 @@ xfce4_verve_plugin_SOURCES = \
verve-history.h \
verve-env.h
-xfce4_verve_plugin_CFLAGS = \
+libverve_la_CFLAGS = \
-I$(top_builddir) \
-I$(top_srcdir) \
-DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
@@ -23,7 +22,7 @@ xfce4_verve_plugin_CFLAGS = \
@LIBPCRE_CFLAGS@ \
@GTHREAD_CFLAGS@
-xfce4_verve_plugin_LDADD = \
+libverve_la_LIBADD = \
@LIBEXO_LIBS@ \
@LIBXFCE4PANEL_LIBS@ \
@LIBXFCE4UI_LIBS@ \
@@ -31,17 +30,24 @@ xfce4_verve_plugin_LDADD = \
@LIBPCRE_LIBS@ \
@GTHREAD_LIBS@
+libverve_la_LDFLAGS = \
+ -avoid-version \
+ -module \
+ -no-undefined \
+ -export-symbols-regex '^xfce_panel_module_(preinit|init|construct)' \
+ $(PLATFORM_LDFLAGS)
+
if HAVE_DBUS
-xfce4_verve_plugin_SOURCES += \
+libverve_la_SOURCES += \
verve-dbus-service-infos.h \
verve-dbus-service.h \
verve-dbus-service.c
-xfce4_verve_plugin_CFLAGS += \
+libverve_la_CFLAGS += \
-DDBUS_API_SUBJECT_TO_CHANGE \
$(DBUS_CFLAGS)
-xfce4_verve_plugin_LDADD += \
+libverve_la_LIBADD += \
$(DBUS_LIBS)
verve-dbus-service-infos.h: Makefile $(srcdir)/verve-dbus-service-infos.xml
@@ -53,32 +59,23 @@ endif
# .desktop file
#
-# Some automake trickery here. Because we cannot use $(libexecdir) in the
-# automake stage, we'll use sed to get the full path into the .desktop file.
-# We also need to let intltool merge the translated fields, so we add an
-# additional level of indirection: a <name>.desktop.in.in file.
+# We need to let intltool merge the translated fields, so we add a
+# level of indirection: a <name>.desktop.in file.
#
-desktop_in_in_files = xfce4-verve-plugin.desktop.in.in
-desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)
-desktopdir = $(datadir)/xfce4/panel-plugins
+desktop_in_files = xfce4-verve-plugin.desktop.in
+desktopdir = $(datadir)/xfce4/panel/plugins
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
EXTRA_DIST = \
- $(desktop_in_in_files) \
+ $(desktop_in_files) \
verve-dbus-service-infos.xml
-DISTCLEANFILES = \
- $(desktop_DATA) $(desktop_in_files)
+DISTCLEANFILES = $(desktop_DATA)
if HAVE_DBUS
DISTCLEANFILES += \
verve-dbus-service-infos.h
endif
-
-# get full path into .desktop file
-%.desktop.in: %.desktop.in.in
- sed -e "s^@PLUGIN_PATH@^$(libexecdir)/xfce4/panel-plugins^" \
- $< > $@
# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/panel-plugin/verve-plugin.c b/panel-plugin/verve-plugin.c
index 1403b2a..f8bd7c4 100644
--- a/panel-plugin/verve-plugin.c
+++ b/panel-plugin/verve-plugin.c
@@ -902,7 +902,7 @@ verve_plugin_construct (XfcePanelPlugin *plugin)
/* Register exteral panel plugin */
-XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (verve_plugin_construct);
+XFCE_PANEL_PLUGIN_REGISTER (verve_plugin_construct);
diff --git a/panel-plugin/xfce4-verve-plugin.desktop.in.in b/panel-plugin/xfce4-verve-plugin.desktop.in
similarity index 79%
rename from panel-plugin/xfce4-verve-plugin.desktop.in.in
rename to panel-plugin/xfce4-verve-plugin.desktop.in
index f2a5d33..d7efc97 100644
--- a/panel-plugin/xfce4-verve-plugin.desktop.in.in
+++ b/panel-plugin/xfce4-verve-plugin.desktop.in
@@ -4,5 +4,5 @@ Encoding=UTF-8
_Name=Verve Command Line
_Comment=Command line interface with auto-completion and command history
Icon=utilities-terminal
-X-XFCE-Exec=@PLUGIN_PATH@/xfce4-verve-plugin
-
+X-XFCE-Internal=FALSE
+X-XFCE-Module=verve
More information about the Xfce4-commits
mailing list