File variety.spec of Package variety

#
# spec file for package variety
#
# Copyright (c) 2025 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


Name:           variety
Version:        0.9.0~b1
Release:        0
Summary:        Wallpaper changer, downloader and manager for Linux
License:        GPL-3.0-only
Group:          System/GUI/Other
URL:            https://github.com/varietywalls/variety
Source0:        %{name}-0.9.0-b1.tar.gz
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools >= 62.3.0
BuildRequires:  python3-setuptools-gettext
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files
Requires:       ImageMagick
Requires:       python3-Pillow
Requires:       python3-beautifulsoup4
Requires:       python3-cairo
Requires:       python3-configobj
Requires:       python3-dbus-python
Requires:       python3-gobject
Requires:       python3-gobject-cairo
Requires:       python3-gobject-Gdk
Requires:       python3-httplib2
Requires:       python3-lxml
Requires:       python3-packaging
Requires:       python3-requests
Requires:       typelib(GdkPixbuf)
Requires:       typelib(GExiv2)
Requires:       typelib(Glib)
Requires:       typelib(Gtk) = 3.0
Requires:       typelib(Notify)
Requires:       typelib(Pango)
Recommends:     feh
Recommends:     fortune-mod
Recommends:     nitrogen
Recommends:     typelib(AyatanaAppIndicator3)
BuildArch:      noarch

%description
Variety is an open-source wallpaper changer, downloader, and manager for
Linux. It supports a variety of sources for wallpapers, including local
files, online services such as Unsplash, Wallhaven.cc, NASA Astronomy Picture
of the Day, and media RSS feeds.

Variety can automatically change wallpapers on a regular interval, allows you
to separate the great images from the junk, and provides easy ways to
customize your desktop with effects, quotes, and a digital clock.

Where supported, Variety sits as a tray icon to allow easy pausing and
resuming. Otherwise, its desktop entry menu provides a similar set of options.

%prep
%autosetup -n %{name}-0.9.0-b1

%build
%python3_build

%install
%python3_install

# Install desktop file
install -D -m 644 %{name}.desktop.in %{buildroot}%{_datadir}/applications/%{name}.desktop
%suse_update_desktop_file %{name}

# Install appdata file
install -D -m 644 %{name}.appdata.xml %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml

# Install man page (if exists)
if [ -f debian/%{name}.1 ]; then
    install -D -m 644 debian/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
fi

# Find locale files
%find_lang %{name}

# Remove duplicate files
%fdupes %{buildroot}%{python3_sitelib}
%fdupes %{buildroot}%{_datadir}

%files -f %{name}.lang
%license LICENSE
%doc README.md CHANGELOG.txt AUTHORS
%{_bindir}/%{name}
%{python3_sitelib}/%{name}/
%{python3_sitelib}/%{name}_lib/
%{python3_sitelib}/jumble/
%{python3_sitelib}/%{name}-*.egg-info/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/metainfo/%{name}.appdata.xml
%{_mandir}/man1/%{name}.1%{?ext_man}

%changelog
openSUSE Build Service is sponsored by