Blob Blame Raw
Name:           variety
Version:        0.6.6
Release:        1%{?dist}
Summary:        Wallpaper changer that automatically downloads wallpapers
License:        GPLv3
Url:            https://launchpad.net/variety
Source0:        https://launchpad.net/%{name}/trunk/%{version}/+download/%{name}_%{version}.tar.gz

# https://bugs.launchpad.net/variety/+bug/1705199
Source1:        %{name}-README

BuildArch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python-setuptools
BuildRequires:  python-distutils-extra
BuildRequires:  python-appindicator
BuildRequires:  python-beautifulsoup4
BuildRequires:  python-configobj
BuildRequires:  python-lxml
BuildRequires:  python2-gexiv2
BuildRequires:  python-pycurl
BuildRequires:  python2-requests
BuildRequires:  python-pillow-devel
BuildRequires:  python-imaging-devel
BuildRequires:  pyexiv2
BuildRequires:  intltool
BuildRequires:  yelp-devel
BuildRequires:  dbus-python
BuildRequires:  pkgconfig(pycairo)
BuildRequires:  pkgconfig(libnotify)
BuildRequires:  gettext
BuildRequires:  desktop-file-utils
BuildRequires:  libappstream-glib
Requires:       dbus-python
Requires:       hicolor-icon-theme
Requires:       ImageMagick
Requires:       libappindicator-gtk3
Requires:       python-lxml
Requires:       python-pillow
Requires:       pycairo
Requires:       python-appindicator
Requires:       python-beautifulsoup4
Requires:       python-configobj
Requires:       python2-gexiv2
Requires:       python-pycurl
Requires:       python2-requests
Requires:       pyexiv2
Requires:       pywebkitgtk

%description
Variety changes the desktop wallpaper on a regular basis, 
using user-specified or automatically downloaded images.

Variety sits conveniently as an indicator in the panel 
and can be easily paused and resumed. The mouse wheel 
can be used to scroll wallpapers back and forth until 
you find the perfect one for your current mood.

Apart from displaying images from local folders, several 
different online sources can be used to fetch wallpapers 
according to user-specified criteria.

Variety can also automatically apply various fancy 
filters to the displayed images - charcoal painting, 
oil painting, heavy blurring, etc. - so that your 
desktop is always fresh and unique. 

%prep
%autosetup -p1
cp -p %{SOURCE1} ./README

# remove debian part
rm -rf debian

# install %{name}.appdata.xml in appdata
sed -i -e 's|metainfo|appdata|' setup.py

%build
%{__python2} setup.py build

%install
%{__python2} setup.py install --root=%{buildroot}

#  non-executable-script /usr/share/variety/scripts/install_ssl_deps.sh 644 /bin/bash
chmod a+x %{buildroot}%{_datadir}/%{name}/scripts/install_ssl_deps.sh

%find_lang %{name}

%check
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/%{name}.appdata.xml

%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/update-desktop-database &> /dev/null || :

%postun
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
/usr/bin/update-desktop-database &> /dev/null || :

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

%files -f %{name}.lang
%doc README
%license COPYING
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/%{name}/
%{python2_sitelib}/jumble/
%{python2_sitelib}/%{name}-*-py*.egg-info
%{python2_sitelib}/%{name}/
%{python2_sitelib}/%{name}_lib/
%{_datadir}/icons/hicolor/22x22/apps/%{name}-indicator-dark.png
%{_datadir}/icons/hicolor/22x22/apps/%{name}-indicator.png
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg

%changelog
* Tue Sep 19 2017 Martin Gansser <martinkg@fedoraproject.org> - 0.6.6-1
- Update to 0.6.6

* Wed Aug 23 2017 Martin Gansser <martinkg@fedoraproject.org> - 0.6.5-1
- Update to 0.6.5
- Cleanup spec file
- Dropped variety-0.6.4-fix_webkit_version.patch
- Dropped BR webkitgtk-devel
- Dropped RR webkitgtk4

* Mon Aug 21 2017 Martin Gansser <martinkg@fedoraproject.org> - 0.6.4-4
- Add variety-0.6.4-fix_webkit_version.patch
- Correct BR webkitgtk3 becomes webkitgtk4 
- Add RR pywebkitgtk

* Sat Aug 19 2017 Martin Gansser <martinkg@fedoraproject.org> - 0.6.4-3
- Add RR libappindicator-gtk3
- Correct RR ImageMagick it's case sensitive
- Add RR webkitgtk3

* Fri Aug 18 2017 Martin Gansser <martinkg@fedoraproject.org> - 0.6.4-2
- Add RR python-lxml
- Add RR python-pillow
- Add RR pycairo
- Add RR dbus-python
- Add RR python-appindicator
- Add RR python-beautifulsoup4
- Add RR python-configobj
- Add RR python2-gexiv2
- Add RR python-pycurl
- Add RR python2-requests
- Add RR pyexiv2
- Add RR imagemagick
- Add RR hicolor-icon-theme
- Add BR libappstream-glib
- Add appdata.xml file

* Tue Jul 18 2017 Martin Gansser <martinkg@fedoraproject.org> - 0.6.4-1
- initial build