File conky-plugins.spec of Package conky-plugins

#
# spec file for package conky-plugins
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

%define bansheever 2.10
%define clementinever 2.03
%define emailver 2.15
%define exailever 2.16
%define forecastver 2.24
%define gcalver 2.16
%define grver 1.08
%define guayadequever 2.09
%define keyringver 1.01
%define miscver 1.06
%define pidginver 2.17
%define rhythmboxver 2.17
%define transmissionver 1.03
%define desktopartver 2.00

Name:           conky-plugins
Version:	1.0
Release:	0
License:	GPL-3.0
Summary:	Collections of Conky scripts everywhere
Url:	https://conky.sourceforge.net
Group:	System/Monitoring
Source0:	README.SuSE
Source1:	conkyemail_%{emailver}.tar.gz
Source2:	conkyexaile_%{exailever}.tar.gz
Source3:	conkybanshee_%{bansheever}.tar.gz
Source4:	conkyclementine_%{clementinever}.tar.gz
Source5:	conkyforecast_%{forecastver}.tar.gz
Source6:	conkygooglecalendar_%{gcalver}.tar.gz
Source7:	conkygooglereader_%{grver}.tar.gz
Source8:	conkyguayadeque_%{guayadequever}.tar.gz
Source9:	conkykeyring_%{keyringver}.tar.gz
Source10:	conkymisc_%{miscver}.tar.gz
Source11:	conkypidgin_%{pidginver}.tar.gz
Source12:	conkyrhythmbox_%{rhythmboxver}.tar.gz
Source13:	conkytransmission_%{transmissionver}.tar.gz
Source14:	rhythmbox-desktop-art_%{desktopartver}.tar.gz
BuildRequires:  fdupes
BuildRequires:	python-distribute
# forecast {
BuildRequires:	python-dateutil
# directory ownership
BuildRequires:	xorg-x11-fonts
%if 0%{?suse_version} > 1220
BuildRequires:	fontpackages-devel
%endif
# } # forecast
# rhythmbox-desktop-art {
# directory ownership
BuildRequires:   rhythmbox
# reresolve Factory
BuildRequires:   typelib-1_0-WebKit-1_0
# }
Requires:	conky
Requires:	conky-cairo
Requires:	conky-banshee >= %{bansheever}
Requires:	conky-clementine >= %{clementinever}
Requires:	conky-email >= %{emailver}
Requires:	conky-exaile >= %{exailever}
Requires:	conky-forecast >= %{forecastver}
Requires:	conky-google-calendar >= %{gcalver}
Requires:	conky-google-reader >= %{grver}
Requires:	conky-guayadeque >= %{guayadequever}
Requires:	conky-keyring >= %{keyringver}
Requires:	conky-misc >= %{miscver}
Requires:	conky-pidgin >= %{pidginver}
Requires:	conky-rhythmbox >= %{rhythmboxver}
Requires:	conky-transmission >= %{transmissionver}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This is a meta package with collections of conky scripts everywhere.
It contains:
- conky-banshee
- conky-clementine
- conky-email
- conky-exaile
- conky-forecast
- conky-google-calendar
- conky-google-reader
- conky-guayadeque
- conky-keyring
- conky-misc
- conky-pidgin
- conky-rhythmbox
- conky-transmission
- rhythmbox-desktop-art

For new inclusions, write to opensuse-factory@opensuse.org mailing list.
Thanks for you contribution! That's how we keep growing strong.

%package -n conky-banshee
Version:        %{bansheever}
Summary:        A python script to get track infos/coverarts from Banshee into Conky
Group:  System/Monitoring
License:        GPL-3.0
Url:    https://launchpad.net/~conky-companions/+archive/ppa/+packages
Requires:       conky
%{py_requires}
Requires:	dbus-1-python
Provides:       conkybanshee = %{bansheever}
Obsoletes:      conkybanshee < %{bansheever}
Recommends:	banshee
BuildArch:      noarch

%description -n conky-banshee
A python script to get track infos/coverarts from Banshee into Conky.

%package -n conky-clementine
Version:        %{clementinever}
Summary:        A python script to get track infos/coverarts from Clementine into Conky
Group:  System/Monitoring
License:        GPL-3.0
Url:    https://launchpad.net/~conky-companions/+archive/ppa/+packages
Requires:       conky
%{py_requires}
Requires:	dbus-1-python
Provides:       conkyclementine = %{clementinever}
Obsoletes:      conkyclementine < %{clementinever}
Recommends:	clementine
BuildArch:      noarch

%description -n conky-clementine
A python script to get track infos/coverarts from Clementine into Conky.

%package -n conky-email
Summary:	A python script to get unread email notifications in Conky
Version:	%{emailver}
Group:	System/Monitoring
License:	GPL-3.0
Url:	https://launchpad.net/~conky-companions/+archive/ppa/+packages
Requires:	conky
%{py_requires}
Requires:	python-keyring
Provides:	conkyemail = %{emailver}
Obsoletes:	conkyemail < %{emailver}
BuildArch:	noarch

%description -n conky-email
A python script to get unread email notifications in conky.

%package -n conky-exaile
Version:	%{exailever}
Summary:	A python script to get track infos/coverarts from Exaile into Conky	
Group:	System/Monitoring
License:	GPL-3.0
Url:	https://launchpad.net/~conky-companions/+archive/ppa/+packages
Requires:	conky
%{py_requires}
Requires:	dbus-1-python
Requires:	python-imaging
Provides:	conkyexaile = %{exailever}
Obsoletes:	conkyexaile < %{exailever}
Recommends:	exaile
BuildArch:	noarch

%description -n conky-exaile
A python script to get track infos/coverarts from Exaile into Conky.

%package -n conky-forecast
Version:	%{forecastver}
Summary:	A python script to get weather forecast from weather.com for Conky
Group:	System/Monitoring
License:	GPL-3.0
Url:    https://launchpad.net/~conky-companions/+archive/ppa/+packages
Requires:       conky
%{py_requires}
Requires:	python-dateutil
Requires:	python-xml
%if 0%{?suse_version} > 1220
%reconfigure_fonts_prereq
%endif
Provides:	conkyforecast = %{forecastver}
Obsoletes:	conkyforecast < %{forecastver}
BuildArch:	noarch

%description -n conky-forecast
A python script to get weather forecast from weather.com for Conky.

%package -n conky-google-calendar
Version:	%{gcalver}
Summary:	A python script to get your Google Calendar into Conky
Group:	System/Monitoring
License:        GPL-3.0
Url:    https://launchpad.net/~conky-companions/+archive/ppa/+packages
Requires:       conky
%{py_requires}
Requires:	python-dateutil
Requires:	python-xml
Requires:	python-keyring
Provides:	conkygooglecalendar = %{gcalver}
Obsoletes:	conkygooglecalendar < %{gcalver}
BuildArch:	noarch

%description -n conky-google-calendar
A python script to get your Google Calendar into Conky.	

%package -n conky-google-reader
Version:	%{grver}
Summary:	A python script to get your Google Reader unread items into Conky
Group:	System/Monitoring
License:	GPL-3.0
Url:    https://launchpad.net/~conky-companions/+archive/ppa/+packages
Requires:       conky
%{py_requires}
Requires:	python-xml
Requires:	python-keyring
Provides:	conkygooglereader = %{grver}
Obsoletes:	conkygooglereader < %{grver}
BuildArch:	noarch

%description -n conky-google-reader
A python script to get your Google Reader unread items into Conky.

%package -n conky-guayadeque
Version:        %{guayadequever}
Summary:        A python script to get track infos/coverarts from Guayadeque into Conky
Group:  System/Monitoring
License:        GPL-3.0
Url:    https://launchpad.net/~conky-companions/+archive/ppa/+packages
Requires:       conky
%{py_requires}
Requires:       dbus-1-python
Provides:       conkyguayadeque = %{guayadequever}
Obsoletes:      conkyguayadeque < %{guayadequever}
Recommends:     guayadeque
BuildArch:      noarch

%description -n conky-guayadeque
A python script to get track infos/coverarts from Guayadeque into Conky.

%package -n conky-keyring
Version:        %{keyringver}
Summary:        A python script to manage your passwords using gnome-keyring in Conky
Group:  System/Monitoring
License:        GPL-3.0
Url:    https://launchpad.net/~conky-companions/+archive/ppa/+packages
Requires:       conky
%{py_requires}
Requires:       python-keyring
Provides:       conkykeyring = %{keyringver}
Obsoletes:      conkykeyring < %{keyringver}
BuildArch:      noarch

%description -n conky-keyring
A python script to manage your passwords using gnome-keyring in Conky.

%package -n conky-misc
Version:	%{miscver}
Summary:	Miscellaneous python scripts for Conky
Group:	System/Monitoring
License:	GPL-3.0
Url:    https://launchpad.net/~conky-companions/+archive/ppa/+packages
Requires:       conky
%{py_requires}
Requires:	python-dateutil
Requires:	python-imaging
Provides:       conkymisc = %{miscver}
Obsoletes:      conkymisc < %{miscver}
BuildArch:      noarch

%description -n conky-misc
Miscellaneous python scripts for various tasks in Conky, eg:
* conkyText - provides formatted output from a delimited text 
  file
* conkyLatLong - provides latitude/longtitude co-ordinates 
  based on your IP address
* conkyDateDiff - provides a difference in time between now/a 
  date to another date
* conkyDaysDiff - provides a difference in days between now/a 
  date to another date
* conkySlideshow - provides a locally stored image on each call 
  based on an input file of image URLs

%package -n conky-pidgin
Version:        %{pidginver}
Summary:        A python script to display Pidgin buddy info in Conky
Group:  System/Monitoring
License:        GPL-3.0
Url:    https://launchpad.net/~conky-companions/+archive/ppa/+packages
Requires:       conky
%{py_requires}
Requires:	dbus-1-python
%if 0%{?suse_version} > 1220
%reconfigure_fonts_prereq
%endif
Provides:       conkypidgin = %{pidginver}
Obsoletes:      conkypidgin < %{pidginver}
Recommends:	pidgin
BuildArch:      noarch

%description -n conky-pidgin
A python script to display Pidgin buddy info in Conky.

%package -n conky-rhythmbox
Version:        %{rhythmboxver}
Summary:        A python script to get track infos/coverarts from Rhythmbox into Conky
Group:  System/Monitoring
License:        GPL-3.0
Url:    https://launchpad.net/~conky-companions/+archive/ppa/+packages
Requires:       conky
%{py_requires}
Requires:       dbus-1-python
Requires:	rhythmbox-desktop-art = %{desktopartver}
Provides:       conkyrhythmbox = %{rhythmboxver}
Obsoletes:      conkyrhythmbox < %{rhythmboxver}
Recommends:     rhythmbox
BuildArch:      noarch

%description -n conky-rhythmbox
A python script to get track infos/coverarts from Rhythmbox into Conky.

%package -n conky-transmission
Version:        %{transmissionver}
Summary:        A python script to display Transmission download progress in Conky
Group:  System/Monitoring
License:        GPL-3.0
Url:    https://launchpad.net/~conky-companions/+archive/ppa/+packages
Requires:       conky
%{py_requires}
Requires:       dbus-1-python
Provides:       conkytransmission = %{transmissionver}
Obsoletes:      conkytransmission < %{transmissionver}
Recommends:     transmission
BuildArch:      noarch

%description -n conky-transmission
A python script to display Transmission download progress in Conky.

%package -n rhythmbox-desktop-art
Version:	%{desktopartver}
Summary:	Rhythmbox plugin displays current song's coverart and info on desktop
Group:	Productivity/Multimedia/Sound/Players
License:	GPL-3.0
Url:	https://launchpad.net/~conky-companions/+archive/ppa/+packages
Requires:	rhythmbox
%{py_requires}
Requires:	python-gtk
Requires:	python-rsvg

%description -n rhythmbox-desktop-art
Rhythmbox plugin which displays the current song's cover art and info on the desktop

%prep
%setup -T -c %{name}-%{version}
cp -r %{SOURCE0} .
mkdir -p {conkyemail,conkyexaile,conkybanshee,conkyclementine,conkyforecast,conkygooglecalendar,conkygooglereader,conkyguayadeque,conkykeyring,conkymisc,conkypidgin,conkyrhythmbox,conkytransmission,rhythmbox-desktop-art}
tar -xzf %{SOURCE1} -C conkyemail
tar -xzf %{SOURCE2} -C conkyexaile
tar -xzf %{SOURCE3} -C conkybanshee
tar -xzf %{SOURCE4} -C conkyclementine
tar -xzf %{SOURCE5} -C conkyforecast
tar -xzf %{SOURCE6} -C conkygooglecalendar
tar -xzf %{SOURCE7} -C conkygooglereader
tar -xzf %{SOURCE8} -C conkyguayadeque
tar -xzf %{SOURCE9} -C conkykeyring
tar -xzf %{SOURCE10} -C conkymisc
tar -xzf %{SOURCE11} -C conkypidgin
tar -xzf %{SOURCE12} -C conkyrhythmbox
tar -xzf %{SOURCE13} -C conkytransmission
tar -xzf %{SOURCE14} -C rhythmbox-desktop-art

%build
for app in conkyemail conkyexaile conkybanshee conkyclementine conkyforecast \
conkygooglecalendar conkygooglereader conkyguayadeque conkykeyring conkymisc \
conkypidgin conkyrhythmbox conkytransmission rhythmbox-desktop-art; do
pushd ${app}/src
python setup.py build
popd
done

%install
for app in conkyemail conkyexaile conkybanshee conkyclementine conkyforecast \
conkygooglecalendar conkygooglereader conkyguayadeque conkymisc conkypidgin \
conkyrhythmbox conkytransmission; do
pushd ${app}/src
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
popd
mkdir -p %{buildroot}%{_docdir}/${app}
cp -r ${app}/src/{AUTHORS,CHANGELOG,COPYING,README} %{buildroot}%{_docdir}/${app}
done

# keyring/rhythmbox-desktop-art
for app in conkykeyring rhythmbox-desktop-art ; do
pushd ${app}/src
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
popd
mkdir -p %{buildroot}%{_docdir}/${app}
cp -r ${app}/src/{AUTHORS,CHANGELOG,COPYING} %{buildroot}%{_docdir}/${app}
done

# fix rhythmbox-desktop-art library
%ifarch x86_64
mkdir -p %{buildroot}%{_libdir}/rhythmbox/plugins/
mv %{buildroot}/usr/lib/rhythmbox/plugins/desktop-art %{buildroot}%{_libdir}/rhythmbox/plugins/
rm -rf %{buildroot}/usr/lib/rhythmbox
%endif

%if 0%{?suse_version} > 1220
%reconfigure_fonts_scriptlets conky-forecast conky-pidgin
%endif

%fdupes %{buildroot}

%files
%defattr(-,root,root)
%doc README.SuSE

%files -n conky-banshee
%defattr(-,root,root)
%doc %{_docdir}/conkybanshee
%{_bindir}/conkyBanshee
%{python_sitelib}/conkybanshee-%{bansheever}-py%{py_ver}.egg-info
%{_datadir}/conkybanshee

%files -n conky-clementine
%defattr(-,root,root)
%doc %{_docdir}/conkyclementine
%{_bindir}/conkyClementine
%{_bindir}/conkyClementine-GetCoverart
%{python_sitelib}/conkyclementine-%{clementinever}-py%{py_ver}.egg-info
%{_datadir}/conkyclementine

%files -n conky-email
%defattr(-,root,root)
%doc %{_docdir}/conkyemail
%{_bindir}/conkyEmail
%{python_sitelib}/conkyemail-%{emailver}-py%{py_ver}.egg-info
%{_datadir}/conkyemail

%files -n conky-exaile
%defattr(-,root,root)
%doc %{_docdir}/conkyexaile
%{_bindir}/conkyExaile
%{_bindir}/conkyExaile-GetCoverart
%{python_sitelib}/conkyexaile-%{exailever}-py%{py_ver}.egg-info
%{_datadir}/conkyexaile

%files -n conky-forecast
%defattr(-,root,root)
%doc %{_docdir}/conkyforecast
%{_bindir}/conkyForecast
%{_bindir}/conkyForecast-SunsetSunriseCountdown
%{_bindir}/conkyForecastWU
%{python_sitelib}/conkyforecast-%{forecastver}-py%{py_ver}.egg-info
%{_datadir}/conkyforecast
%{_datadir}/fonts/truetype/conkyforecast

%files -n conky-google-calendar
%defattr(-,root,root)
%doc %{_docdir}/conkygooglecalendar
%{_bindir}/conkyGoogleCalendar
%{python_sitelib}/conkygooglecalendar-%{gcalver}-py%{py_ver}.egg-info
%{_datadir}/conkygooglecalendar

%files -n conky-google-reader
%defattr(-,root,root)
%doc %{_docdir}/conkygooglereader
%{_bindir}/conkyGoogleReader
%{python_sitelib}/conkygooglereader-%{grver}-py%{py_ver}.egg-info
%{_datadir}/conkygooglereader

%files -n conky-guayadeque
%defattr(-,root,root)
%doc %{_docdir}/conkyguayadeque
%{_bindir}/conkyGuayadeque
%{_bindir}/conkyGuayadeque-GetCoverart
%{python_sitelib}/conkyguayadeque-%{guayadequever}-py%{py_ver}.egg-info
%{_datadir}/conkyguayadeque

%files -n conky-keyring
%defattr(-,root,root)
%doc %{_docdir}/conkykeyring
%{_bindir}/conkyKeyring
%{python_sitelib}/conkykeyring-%{keyringver}-py%{py_ver}.egg-info
%{_datadir}/conkykeyring

%files -n conky-misc
%defattr(-,root,root)
%doc %{_docdir}/conkymisc
%{_bindir}/conkyDateDiff
%{_bindir}/conkyDatetimeDiff
%{_bindir}/conkyDaysDiff
%{_bindir}/conkyLatLong
%{_bindir}/conkyMisc
%{_bindir}/conkySlideshow
%{_bindir}/conkyText
%{python_sitelib}/conkymisc-%{miscver}-py%{py_ver}.egg-info
%{_datadir}/conkymisc

%files -n conky-pidgin
%defattr(-,root,root)
%doc %{_docdir}/conkypidgin
%{_bindir}/conkyPidgin
%{python_sitelib}/conkypidgin-%{pidginver}-py%{py_ver}.egg-info
%{_datadir}/conkypidgin
%{_datadir}/fonts/truetype/conkypidgin

%files -n conky-rhythmbox
%defattr(-,root,root)
%doc %{_docdir}/conkyrhythmbox
%{_bindir}/conkyRhythmbox
%{python_sitelib}/conkyrhythmbox-%{rhythmboxver}-py%{py_ver}.egg-info
%{_datadir}/conkyrhythmbox

%files -n conky-transmission
%defattr(-,root,root)
%doc %{_docdir}/conkytransmission
%{_bindir}/conkyTransmission
%{python_sitelib}/conkytransmission-%{transmissionver}-py%{py_ver}.egg-info
%{_datadir}/conkytransmission

%files -n rhythmbox-desktop-art
%defattr(-,root,root)
%doc %{_docdir}/rhythmbox-desktop-art
%{python_sitelib}/rhythmbox_desktop_art-%{desktopartver}-py%{py_ver}.egg-info
%{_libdir}/rhythmbox/plugins/desktop-art

%changelog

openSUSE Build Service is sponsored by