[Xfce4-commits] <xfce4-time-out-plugin:master> Compile the plugin as a module.
Landry Breuil
noreply at xfce.org
Sun Apr 15 23:02:01 CEST 2012
Updating branch refs/heads/master
to af8489f66dd8fc083dadd0dfcc5f31a1c575b11b (commit)
from cf97fb2aaf5fa71c1323d01cf998766ffeca6ea6 (commit)
commit af8489f66dd8fc083dadd0dfcc5f31a1c575b11b
Author: Landry Breuil <landry at xfce.org>
Date: Sun Apr 15 22:59:00 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
configure.ac.in | 6 +++-
panel-plugin/Makefile.am | 38 ++++++++-----------
panel-plugin/time-out.c | 2 +-
...ktop.in.in => xfce4-time-out-plugin.desktop.in} | 3 +-
4 files changed, 24 insertions(+), 25 deletions(-)
diff --git a/configure.ac.in b/configure.ac.in
index f03ab9b..1591b54 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -2,6 +2,7 @@ dnl xfce4-time-out-plugin - A panel plugin for breaks during work.
dnl
dnl 2007 Jannis Pohlmann <jannis at xfce.org>
dnl 2010 Florian Rivoal <frivoal at xfce.org>
+dnl 2012 Landry Breuil <landry at xfce.org>
dnl
dnl ***************************
@@ -40,7 +41,10 @@ AC_PROG_INSTALL()
AC_PROG_INTLTOOL()
AC_PROG_CC_C_O()
AM_PROG_CC_C_O()
-AC_PROG_LIBTOOL()
+
+dnl Initialize libtool
+LT_PREREQ([2.2.6])
+LT_INIT([disable-static])
dnl **********************************
dnl *** Check for standard headers ***
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 43904f8..bd4211c 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -1,13 +1,11 @@
-plugindir = \
- $(libexecdir)/xfce4/panel-plugins
+plugindir = $(libdir)/xfce4/panel/plugins
#
# xfce4-time-out-plugin
#
-plugin_PROGRAMS = \
- xfce4-time-out-plugin
+plugin_LTLIBRARIES = libtime-out.la
-xfce4_time_out_plugin_SOURCES = \
+libtime_out_la_SOURCES = \
time-out-countdown.h \
time-out-countdown.c \
time-out-lock-screen.h \
@@ -17,7 +15,7 @@ xfce4_time_out_plugin_SOURCES = \
time-out.h \
time-out.c
-xfce4_time_out_plugin_CFLAGS = \
+libtime_out_la_CFLAGS = \
-DDATADIR=\"$(datadir)\" \
-I$(top_srcdir) \
-I$(top_builddir) \
@@ -28,36 +26,32 @@ xfce4_time_out_plugin_CFLAGS = \
$(LIBXFCE4PANEL_CFLAGS) \
$(PLATFORM_CFLAGS)
-xfce4_time_out_plugin_LDADD = \
+libtime_out_la_LIBADD = \
$(LIBXFCE4UTIL_LIBS) \
$(LIBXFCE4UI_LIBS) \
$(LIBXFCE4PANEL_LIBS)
+libtime_out_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 = \
- xfce4-time-out-plugin.desktop.in.in
-
-desktop_in_files = \
- $(desktop_in_in_files:.desktop.in.in=.desktop.in)
+desktopdir = $(datadir)/xfce4/panel/plugins
-%.desktop.in: %.desktop.in.in
- sed -e "s,\@libexecdir\@,$(libexecdir),g" < $< > $@
+desktop_in_files = xfce4-time-out-plugin.desktop.in
desktop_DATA = \
$(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
-EXTRA_DIST = \
- $(desktop_in_in_files)
+EXTRA_DIST = $(desktop_in_files)
-CLEANFILES = \
- $(desktop_in_files) \
- $(desktop_DATA)
+CLEANFILES = $(desktop_DATA)
# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/panel-plugin/time-out.c b/panel-plugin/time-out.c
index a881bbc..945e6b4 100644
--- a/panel-plugin/time-out.c
+++ b/panel-plugin/time-out.c
@@ -148,7 +148,7 @@ static void time_out_lock_countdown_finish (TimeOutCountd
/* Register the plugin */
-XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (time_out_construct);
+XFCE_PANEL_PLUGIN_REGISTER (time_out_construct);
diff --git a/panel-plugin/xfce4-time-out-plugin.desktop.in.in b/panel-plugin/xfce4-time-out-plugin.desktop.in
similarity index 71%
rename from panel-plugin/xfce4-time-out-plugin.desktop.in.in
rename to panel-plugin/xfce4-time-out-plugin.desktop.in
index 924c724..cd762ac 100644
--- a/panel-plugin/xfce4-time-out-plugin.desktop.in.in
+++ b/panel-plugin/xfce4-time-out-plugin.desktop.in
@@ -4,5 +4,6 @@ Encoding=UTF-8
_Name=Time Out
_Comment=Automatically controlled time outs and breaks
Icon=xfce4-time-out-plugin
-X-XFCE-Exec=@libexecdir@/xfce4/panel-plugins/xfce4-time-out-plugin
+X-XFCE-Internal=FALSE
+X-XFCE-Module=time-out
X-XFCE-Unique=true
More information about the Xfce4-commits
mailing list