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

Harald Judt noreply at xfce.org
Sun Aug 18 11:32:06 CEST 2013


Updating branch refs/heads/master
         to 78b49f5eba4ccf0e0aa280e45c80b479ea83e470 (commit)
       from 4e56722b749e6b5c54bd7d8d7814e6339d7f3485 (commit)

commit 78b49f5eba4ccf0e0aa280e45c80b479ea83e470
Author: Harald Judt <h.judt at gmx.at>
Date:   Thu Aug 8 14:22:57 2013 +0200

    Build the plugin as a module.

 configure.ac.in                                 |    9 ++--
 panel-plugin/Makefile.am                        |   51 ++++++++++++-----------
 panel-plugin/cpufreq.desktop.in                 |    7 ++++
 panel-plugin/xfce4-cpufreq-plugin.c             |    2 +-
 panel-plugin/xfce4-cpufreq-plugin.desktop.in.in |    6 ---
 po/POTFILES.in                                  |    2 +-
 6 files changed, 42 insertions(+), 35 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 635e9dd..f720793 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -14,10 +14,9 @@ m4_define([cpufreq_version], [cpufreq_version_major().cpufreq_version_minor().cp
 
 dnl Initialize autoconf
 AC_COPYRIGHT([Copyright (c) 2006 Thomas Schreck <shrek at xfce.org>
-              Copyright (c) 2010,2011 Florian Rivoal <frivoal at xfce.org>
+              Copyright (c) 2010-2011 Florian Rivoal <frivoal at xfce.org>
               Copyright (c) 2013 Harald Judt <h.judt at gmx.at>])
-AC_INIT([xfce4-cpufreq-plugin], [cpufreq_version()],
-	[frivoal at xfce.org])
+AC_INIT([xfce4-cpufreq-plugin], [cpufreq_version()], [http://bugzilla.xfce.org], [xfce4-cpufreq-plugin])
 AC_PREREQ([2.60])
 
 dnl Initialize automake
@@ -27,11 +26,15 @@ AM_MAINTAINER_MODE()
 
 dnl Check for basic programs
 AC_PROG_CC()
+AC_PROG_LD()
 AC_PROG_INSTALL()
 AC_PROG_INTLTOOL()
 LT_PREREQ([2.2.6])
 LT_INIT([disable-static])
 
+dnl Check for standard headers
+AC_HEADER_STDC()
+
 dnl Check for i18n support
 XDT_I18N([@LINGUAS@])
 
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index c8611fa..2b61f12 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -1,19 +1,22 @@
-plugindir = $(libexecdir)/xfce4/panel-plugins
-plugin_PROGRAMS = xfce4-cpufreq-plugin
-
-xfce4_cpufreq_plugin_CFLAGS =					\
-	-I$(top_srcdir)						\
-	@LIBXFCE4PANEL_CFLAGS@					\
-	@LIBXFCE4UTIL_CFLAGS@					\
-	@LIBXFCE4UI_CFLAGS@					\
+AM_CPPFLAGS= 								\
+	-I$(top_srcdir)							\
 	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"
 
-xfce4_cpufreq_plugin_LDADD =					\
-	@LIBXFCE4PANEL_LIBS@					\
-	@LIBXFCE4UTIL_LIBS@					\
-	@LIBXFCE4UI_LIBS@
+plugindir = $(libdir)/xfce4/panel/plugins
 
-xfce4_cpufreq_plugin_SOURCES =					\
+plugin_LTLIBRARIES = libcpufreq.la
+
+libcpufreq_la_CFLAGS =						\
+	$(LIBXFCE4PANEL_CFLAGS)					\
+	$(LIBXFCE4UTIL_CFLAGS)					\
+	$(LIBXFCE4UI_CFLAGS)
+
+libcpufreq_la_LIBADD =						\
+	$(LIBXFCE4PANEL_LIBS)					\
+	$(LIBXFCE4UTIL_LIBS)					\
+	$(LIBXFCE4UI_LIBS)
+
+libcpufreq_la_SOURCES =						\
 	xfce4-cpufreq-plugin.h					\
 	xfce4-cpufreq-plugin.c					\
 	xfce4-cpufreq-linux.h					\
@@ -25,20 +28,20 @@ xfce4_cpufreq_plugin_SOURCES =					\
 	xfce4-cpufreq-utils.h					\
 	xfce4-cpufreq-utils.c
 
-desktop_in_in_files = xfce4-cpufreq-plugin.desktop.in.in
-desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)
+libcpugraph_la_LDFLAGS = \
+	-avoid-version \
+	-module \
+	-no-undefined \
+	-export-symbols-regex '^xfce_panel_module_(preinit|init|construct)' \
+	$(PLATFORM_LDFLAGS)
 
-desktopdir = $(datadir)/xfce4/panel-plugins
+desktopdir = $(datadir)/xfce4/panel/plugins
+desktop_in_files = cpufreq.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
 EXTRA_DIST = 								\
-	$(desktop_in_in_files)
-
-DISTCLEANFILES =							\
-	$(desktop_DATA) $(desktop_in_files)
+	$(desktop_in_files)
 
-# get full path into .desktop file
-%.desktop.in: %.desktop.in.in
-	sed -e "s^@PLUGIN_PATH@^$(libexecdir)/xfce4/panel-plugins^"	\
-		$< > $@
+DISTCLEANFILES =								\
+	$(desktop_DATA)
diff --git a/panel-plugin/cpufreq.desktop.in b/panel-plugin/cpufreq.desktop.in
new file mode 100644
index 0000000..c06261c
--- /dev/null
+++ b/panel-plugin/cpufreq.desktop.in
@@ -0,0 +1,7 @@
+[Xfce Panel]
+Type=X-XFCE-PanelPlugin
+_Name=CPU Frequency Monitor
+_Comment=Show cpu frequencies and governours
+Icon=xfce4-cpufreq-plugin
+X-XFCE-Internal=FALSE
+X-XFCE-Module=cpufreq
diff --git a/panel-plugin/xfce4-cpufreq-plugin.c b/panel-plugin/xfce4-cpufreq-plugin.c
index fffd30b..bad8bf8 100644
--- a/panel-plugin/xfce4-cpufreq-plugin.c
+++ b/panel-plugin/xfce4-cpufreq-plugin.c
@@ -400,4 +400,4 @@ cpufreq_construct (XfcePanelPlugin *plugin)
 			  G_CALLBACK (cpufreq_configure), NULL);
 }
 
-XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (cpufreq_construct);
+XFCE_PANEL_PLUGIN_REGISTER (cpufreq_construct);
diff --git a/panel-plugin/xfce4-cpufreq-plugin.desktop.in.in b/panel-plugin/xfce4-cpufreq-plugin.desktop.in.in
deleted file mode 100644
index 9bc39e2..0000000
--- a/panel-plugin/xfce4-cpufreq-plugin.desktop.in.in
+++ /dev/null
@@ -1,6 +0,0 @@
-[Xfce Panel]
-Type=X-XFCE-PanelPlugin
-_Name=CPU Frequency Monitor
-_Comment=Shows the cpu frequency and governours
-Icon=xfce4-cpufreq-plugin
-X-XFCE-Exec=@PLUGIN_PATH@/xfce4-cpufreq-plugin
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 0a1ef9b..eb05e65 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,4 +2,4 @@ panel-plugin/xfce4-cpufreq-configure.c
 panel-plugin/xfce4-cpufreq-linux.c
 panel-plugin/xfce4-cpufreq-overview.c
 panel-plugin/xfce4-cpufreq-plugin.c
-panel-plugin/xfce4-cpufreq-plugin.desktop.in.in
+panel-plugin/cpufreq.desktop.in


More information about the Xfce4-commits mailing list