Updating branch refs/heads/master
         to 48a4857bf8dde3631730995978e6548bc40e5284 (commit)
       from eceee0f7bc9dbee103a992a88e7fd08197711d4c (commit)

commit 48a4857bf8dde3631730995978e6548bc40e5284
Author: Landry Breuil <lan...@xfce.org>
Date:   Mon Apr 9 17:48:34 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 +++++++++-----------
 panel-plugin/wavelan.c                             |    2 +-
 .../{wavelan.desktop.in.in => wavelan.desktop.in}  |    2 +-
 3 files changed, 20 insertions(+), 25 deletions(-)

diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 00fcdab..5724ff8 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -2,49 +2,44 @@ INCLUDES =                                                    
        \
        -DG_LOG_DOMAIN=\"xfce4-wavelan-plugin\"                         \
        -DPACKAGE_LOCALE_DIR=\"$(localedir)\"
 
-plugindir = $(libexecdir)/xfce4/panel-plugins
-plugin_PROGRAMS = xfce4-wavelan-plugin
+plugindir = $(libdir)/xfce4/panel/plugins
 
-#plugin_LTLIBRARIES =                                                  \
-#      libwavelan.la
+plugin_LTLIBRARIES = libwavelan.la
 
-xfce4_wavelan_plugin_LDADD =                                                   
\
+libwavelan_la_LIBADD =                                                 \
                                $(LIBM)                                         
\
                                @LIBXFCE4PANEL_LIBS@                            
\
                                @LIBXFCE4UI_LIBS@
 
-xfce4_wavelan_plugin_SOURCES =                                                 
\
+libwavelan_la_SOURCES =                                                        
\
        wavelan.c                                                       \
        wi.h                                                            \
        wi_bsd.c                                                        \
        wi_common.c                                                     \
        wi_linux.c
 
-xfce4_wavelan_plugin_CFLAGS =                                                  
\
+libwavelan_la_CFLAGS =                                                 \
        @LIBXFCE4PANEL_CFLAGS@                                                  
\
        @LIBXFCE4UI_CFLAGS@
 
+libwavelan_la_LDFLAGS = \
+       -avoid-version \
+       -module \
+       -no-undefined \
+       -export-symbols-regex '^xfce_panel_module_(preinit|init|construct)' \
+       $(PLATFORM_LDFLAGS)
+
 # .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 = wavelan.desktop.in.in
-desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)
+desktop_in_files = wavelan.desktop.in
 
-desktopdir = $(datadir)/xfce4/panel-plugins
+desktopdir = $(datadir)/xfce4/panel/plugins
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
-EXTRA_DIST =                   $(desktop_in_in_files)
-
-CLEANFILES =                   $(desktop_DATA) $(desktop_in_files)
-                                
-# get full path into .desktop file
-%.desktop.in: %.desktop.in.in
-       sed -e "s^@PLUGIN_PATH@^$(libexecdir)/xfce4/panel-plugins^" \
-               $< > $@
-
+EXTRA_DIST = $(desktop_in_files)
 
+DISTCLEANFILES = $(desktop_DATA)
diff --git a/panel-plugin/wavelan.c b/panel-plugin/wavelan.c
index 6bf0af5..b3bb9b2 100644
--- a/panel-plugin/wavelan.c
+++ b/panel-plugin/wavelan.c
@@ -677,5 +677,5 @@ int main(int argc, char** argv)
        return 0;
 }
 #else
-XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL(wavelan_construct);
+XFCE_PANEL_PLUGIN_REGISTER(wavelan_construct);
 #endif
diff --git a/panel-plugin/wavelan.desktop.in.in 
b/panel-plugin/wavelan.desktop.in
similarity index 74%
rename from panel-plugin/wavelan.desktop.in.in
rename to panel-plugin/wavelan.desktop.in
index c9eea64..5dc36de 100644
--- a/panel-plugin/wavelan.desktop.in.in
+++ b/panel-plugin/wavelan.desktop.in
@@ -4,4 +4,4 @@ Encoding=UTF-8
 _Name=Wavelan
 _Comment=View the status of a wireless network
 Icon=network-wireless
-X-XFCE-Exec=@PLUGIN_PATH@/xfce4-wavelan-plugin
+X-XFCE-Exec=wavelan
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to