Blob Blame History Raw
# This package depends on automagic byte compilation
# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2
%global _python_bytecompile_extra 1

#For git snapshots, set to 0 to use release instead:
%global usesnapshot 1
%if 0%{?usesnapshot}
%global commit0 2dd2ee2fcaa5c45a0bf8d9847ea7e72622f72925
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
%global snapshottag .git%{shortcommit0}
%endif

Name:           variety
%if 0%{?usesnapshot}
Version:        0.8.0
Release:        0.2%{?snapshottag}%{?dist}
%else
Version:        0.7.2
Release:        2%{?dist}
%endif
Summary:        Wallpaper changer that automatically downloads wallpapers
License:        GPLv3
URL:            https://github.com/varietywalls/variety

%if 0%{?usesnapshot}
Source0:        %{url}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz
%else
Source0:        https://github.com/varietywalls/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
%endif

BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-distutils-extra
BuildRequires:  python3-configobj
BuildRequires:  python3-lxml
BuildRequires:  python3-gexiv2
BuildRequires:  python3-pycurl
BuildRequires:  python3-requests
BuildRequires:  python3-pillow-devel
BuildRequires:  intltool
BuildRequires:  yelp-devel
BuildRequires:  python3-dbus
BuildRequires:  python3-cairo-devel
BuildRequires:  pkgconfig(libnotify)
BuildRequires:  gettext
BuildRequires:  desktop-file-utils
BuildRequires:  libappstream-glib
Requires:       python3-dbus
Requires:       hicolor-icon-theme
Requires:       ImageMagick
Requires:       libappindicator-gtk3
Requires:       python3-lxml
Requires:       python3-pillow
BuildRequires:  python3-cairo
#Requires:       python3-appindicator -- not available yet
Requires:       python3-beautifulsoup4
Requires:       python3-configobj
Requires:       python3-gexiv2
Requires:       python3-pycurl
Requires:       python3-requests

%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

%if 0%{?usesnapshot}
%setup -q -n %{name}-%{commit0}
%else
%autosetup -p1
%endif



# remove debian part
rm -rf debian

%build
%{__python3} setup.py build

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

%find_lang %{name}

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

%files -f %{name}.lang
%doc README.md
%license COPYING
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_metainfodir}/%{name}.appdata.xml
%{_datadir}/%{name}/
%{python3_sitelib}/jumble/
%{python3_sitelib}/%{name}-*-py*.egg-info
%{python3_sitelib}/%{name}/
%{python3_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
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-0.2.git2dd2ee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Sat Jun 29 2019 Martin Gansser <martinkg@fedoraproject.org> - 0.8.0-0.1.git2dd2ee2
- Update to 0.8.0-0.1.git2dd2ee2

* Mon Apr 22 2019 Martin Gansser <martinkg@fedoraproject.org> - 0.7.2-1
- Update to 0.7.2

* Fri Apr 19 2019 Miro HronĨok <mhroncok@redhat.com> - 0.7.1-4
- Drop obsolete Python 2 dependencies

* Mon Feb 04 2019 Kalev Lember <klember@redhat.com> - 0.7.1-3
- Drop obsolete pyexiv2 dependency

* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Nov 09 2018 Martin Gansser <martinkg@fedoraproject.org> - 0.7.1-1
- Update to 0.7.1

* Fri Oct 05 2018 Martin Gansser <martinkg@fedoraproject.org> - 0.7.0-2
- Use Metainfo dir for appdata file

* Mon Oct 01 2018 Martin Gansser <martinkg@fedoraproject.org> - 0.7.0-1
- Update to 0.7.0
- Switche to python3

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Fri May 18 2018 Martin Gansser <martinkg@fedoraproject.org> - 0.6.9-1
- Update to 0.6.9

* Tue May 01 2018 Martin Gansser <martinkg@fedoraproject.org> - 0.6.8-2
- Dropped RR pywebkitgtk (BZ#1573401)

* Mon Apr 23 2018 Martin Gansser <martinkg@fedoraproject.org> - 0.6.8-1
- Update to 0.6.8

* Thu Apr 05 2018 Martin Gansser <martinkg@fedoraproject.org> - 0.6.7-2
- Add bytecompile with Python 2 %%global __python %%{__python2}

* Wed Apr 04 2018 Martin Gansser <martinkg@fedoraproject.org> - 0.6.7-1
- Update to 0.6.7
- Changed SOURCE link to github
- Fix python requires for f28

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jan 18 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.6-2
- Remove obsolete scriptlets

* 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