File mnemosyne.spec of Package Mnemosyne

# spec file for package mnemosyne
# Copyright (c) 2019 SUSE LINUX 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

Name:           mnemosyne
Version:        2.6.1
Release:        0
Summary:        Flash-card learning tool
License:        GPL-2.0-or-later
Group:          Productivity/Other
Source1:        %{name}.png
Source2:        %{name}.desktop
Source3:        AUTHORS
BuildRequires:  dos2unix
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
Requires:       python3-cheroot >= 5.0.0
Requires:       python3-CherryPy
Requires:       python3-Pillow
Requires:       python3-WebOb
Requires:       python3-matplotlib
Requires:       python3-matplotlib-qt5
Requires:       python3-qt5 >= 5.8.2
Requires:       python3-qtwebengine-qt5
BuildArch:      noarch
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%if 0%{?suse_version}
Recommends:     texlive-latex

Mnemosyne resembles a traditional flash-card program but with an
important twist: it uses a sophisticated algorithm to schedule the best
time for a card to come up for review.


%setup -q -n Mnemosyne-%{version}
# rpmlint
find -name "*.py" | xargs -r dos2unix
find -name "" | xargs -r dos2unix
find -name "ChangeLog" | xargs -r dos2unix

cp %{SOURCE3} ./
env CFLAGS="%{optflags}" \
python3 build

python3 install \
        --root=%{buildroot} \
        --prefix="%{_prefix}" \

install -Dm644 %{SOURCE2} %{buildroot}/%{_datadir}/applications/%{name}.desktop
test -d %{buildroot}/%{_datadir}/icons && rm -rf %{buildroot}/%{_datadir}/icons

%find_lang mnemosyne
%if 0%{?suse_version}
%suse_update_desktop_file -i -n -r %{name} Education Languages


%files lang -f %{name}.lang