[xmonad-log-applet] build both GNOME and XFCE versions

Dan Callaghan dcallagh at fedoraproject.org
Tue Sep 11 08:18:39 UTC 2012


commit 028564d598c1cf3014c751fac7aac3190d0d0f3f
Author: Dan Callaghan <djc at djc.id.au>
Date:   Mon Aug 27 14:04:16 2012 +1000

    build both GNOME and XFCE versions

 xmonad-log-applet.spec |   80 ++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 74 insertions(+), 6 deletions(-)
---
diff --git a/xmonad-log-applet.spec b/xmonad-log-applet.spec
index e664dcf..5f88fb0 100644
--- a/xmonad-log-applet.spec
+++ b/xmonad-log-applet.spec
@@ -1,6 +1,6 @@
 Name:           xmonad-log-applet
 Version:        2.0.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Panel applet to display Xmonad log information
 Group:          User Interface/X
 License:        BSD
@@ -12,9 +12,26 @@ Patch1:         %{name}-empty-dbus-services-dir.patch
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(dbus-glib-1)
 BuildRequires:  pkgconfig(libxfce4panel-1.0)
+BuildRequires:  pkgconfig(libpanelapplet-4.0)
 
 %description
-xmonad-log-applet is for Xmonad users who find the GNOME or Xfce panel useful.
+xmonad-log-applet is for Xmonad users who find the GNOME or XFCE panel useful.
+The applet will show the active workspaces, the title of the selected window,
+or any other information you send it from your xmonad.hs.
+
+%package xfce
+Summary:        XFCE panel plugin to display Xmonad log information
+
+%description xfce
+xmonad-log-applet is for Xmonad users who find the XFCE panel useful.
+The applet will show the active workspaces, the title of the selected window,
+or any other information you send it from your xmonad.hs.
+
+%package gnome
+Summary:        GNOME panel applet to display Xmonad log information
+
+%description gnome
+xmonad-log-applet is for Xmonad users who find the GNOME panel useful.
 The applet will show the active workspaces, the title of the selected window,
 or any other information you send it from your xmonad.hs.
 
@@ -25,32 +42,83 @@ or any other information you send it from your xmonad.hs.
 aclocal
 automake
 autoconf
+cp -pr . ../xfce4
+cp -pr . ../gnome3
 
 %build
+# The upstream build only allows selecting one of XFCE, GNOME2, or GNOME3, but 
+# we would like to package all three. So we run the build three times.
+
+( cd ../xfce4
 %configure --with-panel=xfce4
 make %{?_smp_mflags}
+)
+
+# Can't build for GNOME2, but this could potentially be ported to one of the 
+# GNOME2 forks in future
+#( cd ../gnome2
+#%%configure --with-panel=gnome2
+#make %%{?_smp_mflags}
+#)
+
+( cd ../gnome3
+%configure --with-panel=gnome3
+make %{?_smp_mflags}
+)
 
 %install
+( cd ../xfce4
+make DESTDIR=%{buildroot} install
+)
+
+#( cd ../gnome2
+#make DESTDIR=%%{buildroot} install
+#)
+
+( cd ../gnome3
 make DESTDIR=%{buildroot} install
+)
+
+%post xfce
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
-%post
+%post gnome
 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
-%postun
+%postun xfce
+if [ $1 -eq 0 ] ; then
+    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+
+%postun gnome
 if [ $1 -eq 0 ] ; then
     /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
     /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 fi
 
-%posttrans
+%posttrans xfce
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
+%posttrans gnome
 /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
-%files
+%files xfce
 %doc README.md LICENSE AUTHORS.md
 %{_libdir}/xfce4/panel/plugins/%{name}
 %{_datadir}/xfce4/panel-plugins/%{name}.desktop
 %{_datadir}/icons/hicolor/48x48/apps/%{name}.png
 
+%files gnome
+%doc README.md LICENSE AUTHORS.md
+%{_libexecdir}/%{name}
+%{_datadir}/dbus-1/services/org.gnome.panel.applet.XmonadLogAppletFactory.service
+%{_datadir}/gnome-panel/4.0/applets/org.gnome.panel.XmonadLogApplet.panel-applet
+%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
+
 %changelog
+* Mon Aug 27 2012 Dan Callaghan <dcallagh at redhat.com> 2.0.0-2
+- build both GNOME and XFCE versions
+
 * Sat Apr 21 2012 Dan Callaghan <dcallagh at redhat.com> 2.0.0-1
 - initial version


More information about the scm-commits mailing list