A new user interface for you! Read more...

File trackma.spec of Package trackma

#
# spec file for package wmal
#
# Copyright (c) 2014 Krzysztof Wiktorczyk <magu44@gmail.com>
#
# 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/
#


Name:           trackma
Version:        0.7.6~git20181114T033636
Release:        0
License:        GPL-3.0
Summary:        Linux Anime Lists Tracker
Url:            http://z411.github.io/trackma
BuildArch:      noarch
Group:          Productivity/Multimedia
Source0:        %{name}-%{version}.tar.gz
Source1:        %{name}-qt.desktop
Source2:        %{name}-gtk.desktop
Source3:        trackma.png
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
#BuildRequires:  python3-pip
Requires:       lsof
Requires:       python3-pyinotify
Obsoletes:      wmal

%description
Trackma aims to be a lightweight and simple but feature-rich program for GNU/Linux and Unix based systems
for fetching, updating and using data from personal lists hosted in different media tracking websites
like MyAnimeList, Melative or VNDB.

%package qt4
Summary:        Qt4 interface for Trackma
Group:          Productivity/Multimedia
BuildRequires:	update-desktop-files
BuildRequires:  python3-qt4-devel
Requires:       python3-qt4
Requires:       python3-Pillow
Requires:       %{name}
Provides:       %{name}-ui
Obsoletes:      wmal-ui

%description qt4
Qt interface for Trackma, an anime lists tracker

%package qt
Summary:        Qt interface for Trackma
Group:          Productivity/Multimedia
BuildRequires:	update-desktop-files
BuildRequires:  python3-qt5-devel
Requires:       python3-qt5
Requires:       python3-Pillow
Requires:       %{name}
Provides:       %{name}-ui
Obsoletes:      wmal-ui

%description qt
Qt interface for Trackma, an anime lists tracker

%package gtk
Summary:        GTK interface for Trackma
Group:          Productivity/Multimedia
BuildRequires:	update-desktop-files
BuildRequires:  python3-cairo-devel
Requires:       python3-cairo
Requires:       python3-gobject-Gdk
Requires:       python3-gobject-cairo
Requires:       python3-Pillow
Requires:       %{name}
Provides:       %{name}-ui
Obsoletes:      wmal-ui

%description gtk
GTK interface for Trackma, an anime lists tracker

%package curses
Summary:        Console interface for Trackma
Group:          Productivity/Multimedia
BuildRequires:  python3-urwid
Requires:       python3-urwid
Requires:       python3-Pillow
Requires:       %{name}
Provides:       %{name}-ui
Obsoletes:      wmal-ui

%description curses
Advanced —Āonsole interface for Trackma, an anime lists tracker

%prep
%setup -q -n %{name}-%{version}

%build
python3 setup.py build

%install
%__install -dm 755 %{buildroot}%{_bindir}
%__install -dm 755 %{buildroot}%{_datadir}/applications/
%__install -dm 755 %{buildroot}%{_datadir}/pixmaps/
python3 setup.py install --root="%{buildroot}" --prefix="%{_prefix}"
install -m 644 %{SOURCE3} \
%{buildroot}%{_datadir}/pixmaps/trackma.png
install -m 644 %{SOURCE1} \
%{buildroot}%{_datadir}/applications/%name-qt.desktop
install -m 644 %{SOURCE2} \
%{buildroot}%{_datadir}/applications/%name-gtk.desktop
%suse_update_desktop_file -r -n -i %{name}-qt Network News
%suse_update_desktop_file -r -n -i %{name}-gtk Network News

%files
%defattr(-,root,root)
%{_bindir}/%{name}
%dir %python3_sitelib/%{name}
%python3_sitelib/%{name}/*
%python3_sitelib/*egg-info
%{_datadir}/pixmaps/trackma.png
%exclude %python3_sitelib/%{name}/ui/qt4ui.py*
%exclude %python3_sitelib/%{name}/ui/qtui.py*
%exclude %python3_sitelib/%{name}/ui/gtkui.py*
%exclude %python3_sitelib/%{name}/ui/curses.py*
%exclude %{_datadir}/applications/%name-qt.desktop*
%exclude %{_datadir}/applications/%name-gtk.desktop*

%files qt4
%defattr(-,root,root)
%{_bindir}/%{name}-qt4
%python3_sitelib/%{name}/ui/qt4ui.py*

%files qt
%defattr(-,root,root)
%{_bindir}/%{name}-qt
%python3_sitelib/%{name}/ui/qtui.py*
%{_datadir}/applications/%name-qt.desktop

%files gtk
%defattr(-,root,root)
%{_bindir}/%{name}-gtk
%python3_sitelib/%{name}/ui/gtkui.py*
%{_datadir}/applications/%name-gtk.desktop

%files curses
%defattr(-,root,root)
%{_bindir}/%{name}-curses
%python3_sitelib/%{name}/ui/curses.py*