Blob Blame History Raw
Name:           xmonad-log-applet
Version:        2.1.0
Release:        3%{?dist}
Summary:        Panel applet to display Xmonad log information
Group:          User Interface/X
License:        BSD
URL:            https://github.com/alexkay/xmonad-log-applet
Source0:        http://xmonad-log-applet.googlecode.com/files/%{name}-%{version}.tar.gz
# Trivial patch to configure.ac only -- there was no API breakage, apparently
Patch1:         0001-update-to-libmatepanelapplet-4.0.patch

BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(libxfce4panel-1.0)
BuildRequires:  pkgconfig(libmatepanelapplet-4.0)

%description
xmonad-log-applet is for Xmonad users who find the XFCE or MATE 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
Conflicts:      %{name}-mate < %{version}-%{release}
# for directory ownership:
Requires:       xfce4-panel

%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 mate
Summary:        MATE panel applet to display Xmonad log information
Conflicts:      %{name}-xfce < %{version}-%{release}
# for directory ownership:
Requires:       mate-panel

%description mate
xmonad-log-applet is for Xmonad users who find the MATE 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.

%prep
%setup -q
%patch1 -p1
aclocal
automake
autoconf
cp -pr . ../xfce4
cp -pr . ../mate

%build
# The upstream build only allows selecting one desktop environment, but 
# we would like to package all three. So we run the build three times.

( cd ../xfce4
%configure --with-panel=xfce4
make %{?_smp_mflags}
)

( cd ../mate
%configure --with-panel=mate
make %{?_smp_mflags}
)

%install
( cd ../xfce4
make DESTDIR=%{buildroot} install
)

( cd ../mate
make DESTDIR=%{buildroot} install
)

%post xfce
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%post mate
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%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 mate
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 xfce
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :

%posttrans mate
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :

%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 mate
%doc README.md LICENSE AUTHORS.md
%{_libexecdir}/%{name}
%{_datadir}/dbus-1/services/org.mate.panel.applet.XmonadLogAppletFactory.service
%{_datadir}/mate-panel/applets/org.mate.panel.XmonadLogApplet.mate-panel-applet
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png

%changelog
* Sun Apr 14 2013 Peter Robinson <pbrobinson@fedoraproject.org> 2.1.0-3
- Drop gnome-panel support as no longer supported

* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Fri Jan 18 2013 Dan Callaghan <dcallagh@redhat.com> 2.1.0-1
- new upstream release 2.1.0: adds MATE support, no other changes

* Mon Sep 03 2012 Dan Callaghan <dcallagh@redhat.com> 2.0.0-3
- added explicit Requires for directory ownership

* Mon Aug 27 2012 Dan Callaghan <dcallagh@redhat.com> 2.0.0-2
- build both GNOME and XFCE versions

* Sat Apr 21 2012 Dan Callaghan <dcallagh@redhat.com> 2.0.0-1
- initial version