[Xfce4-commits] <xfce4-places-plugin:master> Compile the plugin as a module
Andrzej
noreply at xfce.org
Fri Apr 20 03:58:02 CEST 2012
Updating branch refs/heads/master
to a755ac518a7a9034f693149dbcd879eccc68e48c (commit)
from a09b43236e6640c618cac58fefdd6366fae32792 (commit)
commit a755ac518a7a9034f693149dbcd879eccc68e48c
Author: Landry Breuil <landry at xfce.org>
Date: Thu Apr 19 10:06:24 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.in.in | 5 ++-
panel-plugin/Makefile.am | 46 ++++++++------------
panel-plugin/places.c | 2 +-
.../{places.desktop.in.in => places.desktop.in} | 4 +-
po/POTFILES.in | 2 +-
5 files changed, 26 insertions(+), 33 deletions(-)
diff --git a/configure.in.in b/configure.in.in
index 8968075..dca7711 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -17,9 +17,12 @@ dnl check for basic programs
AC_PROG_CC()
AM_PROG_CC_C_O
AC_PROG_INSTALL()
-AC_PROG_LIBTOOL()
AC_PROG_INTLTOOL()
+dnl Initialize libtool
+LT_PREREQ([2.2.6])
+LT_INIT([disable-static])
+
dnl check for required packages
XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.22.0])
XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.22.0])
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index f3f6fb5..64c85ef 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -17,19 +17,18 @@ xfce4_popup_places_LDADD = \
-plugindir = $(libexecdir)/xfce4/panel-plugins
+plugindir = $(libdir)/xfce4/panel/plugins
-plugin_PROGRAMS = \
- xfce4-places-plugin
+plugin_LTLIBRARIES = libplaces.la
if HAVE_LIBNOTIFY
-xfce4_places_plugin_notify_sources = \
+libplaces_la_notify_sources = \
model_volumes_notify.c \
model_volumes_notify.h
endif
-xfce4_places_plugin_SOURCES = \
- $(xfce4_places_plugin_notify_sources) \
+libplaces_la_SOURCES = \
+ $(libplaces_la_notify_sources) \
places.c \
places.h \
support.c \
@@ -51,7 +50,7 @@ xfce4_places_plugin_SOURCES = \
-xfce4_places_plugin_CFLAGS = \
+libplaces_la_CFLAGS = \
-I$(top_builddir) \
-I$(top_srcdir) \
-DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
@@ -68,7 +67,7 @@ xfce4_places_plugin_CFLAGS = \
$(EXO_CFLAGS) \
$(PLATFORM_CFLAGS)
-xfce4_places_plugin_LDADD = \
+libplaces_la_LIBADD = \
$(GIO_LIBS) \
$(GIO_UNIX_LIBS) \
$(GLIB_LIBS) \
@@ -83,32 +82,23 @@ xfce4_places_plugin_LDADD = \
$(LIBX11_LIBS) \
$(EXO_LIBS)
+libplaces_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 = \
- places.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" < $< > $@
-
-desktop_DATA = \
- $(desktop_in_files:.desktop.in=.desktop)
-
+desktopdir = $(datadir)/xfce4/panel/plugins
+desktop_in_files = places.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/places.c b/panel-plugin/places.c
index 4fe3557..9eed61e 100644
--- a/panel-plugin/places.c
+++ b/panel-plugin/places.c
@@ -68,6 +68,6 @@ places_construct(XfcePanelPlugin *plugin)
DBG("done");
}
-XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL(places_construct);
+XFCE_PANEL_PLUGIN_REGISTER(places_construct);
/* vim: set ai et tabstop=4: */
diff --git a/panel-plugin/places.desktop.in.in b/panel-plugin/places.desktop.in
similarity index 65%
rename from panel-plugin/places.desktop.in.in
rename to panel-plugin/places.desktop.in
index b506237..772cef8 100644
--- a/panel-plugin/places.desktop.in.in
+++ b/panel-plugin/places.desktop.in
@@ -3,5 +3,5 @@ Type=X-XFCE-PanelPlugin
_Name=Places
_Comment=Access folders, documents, and removable media
Icon=file-manager
-X-XFCE-Exec=@libexecdir@/xfce4/panel-plugins/xfce4-places-plugin
-
+X-XFCE-Module=places
+X-XFCE-Unique=FALSE
diff --git a/po/POTFILES.in b/po/POTFILES.in
index b7b58c6..34c349f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,6 @@
panel-plugin/places.c
panel-plugin/places.h
-panel-plugin/places.desktop.in.in
+panel-plugin/places.desktop.in
panel-plugin/model.c
panel-plugin/model.h
panel-plugin/model_system.c
More information about the Xfce4-commits
mailing list