From 8a1c5245b2e14e8dc542396d41ce09cb6eaf7646 Mon Sep 17 00:00:00 2001 From: Christian Krause Date: Jun 06 2019 19:16:21 +0000 Subject: Update to new major upstream version 2.1.13 (BZ 1612847) Spec file cleanup --- diff --git a/.gitignore b/.gitignore index 20278fd..2b35509 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ anki-1.0.1.tgz /anki-2.0.43-source.tgz /anki-2.0.50-source.tgz /anki-2.0.52-source.tgz +/anki-2.1.13-source.tgz diff --git a/anki-2.0.50-use-python2-shebang.patch b/anki-2.0.50-use-python2-shebang.patch deleted file mode 100644 index 4eb51a1..0000000 --- a/anki-2.0.50-use-python2-shebang.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -uNr anki-2.0.50.old/anki/anki anki-2.0.50/anki/anki ---- anki-2.0.50.old/anki/anki 2016-05-12 04:40:52.000000000 +0200 -+++ anki-2.0.50/anki/anki 2018-04-11 00:59:13.901232410 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - - import os, sys - # system-wide install -diff -uNr anki-2.0.50.old/runanki anki-2.0.50/runanki ---- anki-2.0.50.old/runanki 2016-03-21 08:28:07.000000000 +0100 -+++ anki-2.0.50/runanki 2018-04-11 00:58:54.213952994 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - - import sys - sys.path.insert(0, "/usr/share/anki") diff --git a/anki-2.0.50-use-system-certificates.patch b/anki-2.0.50-use-system-certificates.patch deleted file mode 100644 index 88e6bed..0000000 --- a/anki-2.0.50-use-system-certificates.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uNr anki-2.0.50.old/anki/sync.py anki-2.0.50/anki/sync.py ---- anki-2.0.50.old/anki/sync.py 2017-08-27 03:51:01.000000000 +0200 -+++ anki-2.0.50/anki/sync.py 2018-04-11 00:30:32.785697476 +0200 -@@ -52,7 +52,7 @@ - if not os.path.exists(certs): - assert 0, "Your distro has not packaged Anki correctly." - return httplib2.Http( -- timeout=HTTP_TIMEOUT, ca_certs=certs, -+ timeout=HTTP_TIMEOUT, - proxy_info=HTTP_PROXY, - disable_ssl_certificate_validation=not not HTTP_PROXY) - diff --git a/anki.spec b/anki.spec index ef357db..a40ea14 100644 --- a/anki.spec +++ b/anki.spec @@ -1,11 +1,9 @@ -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} - Name: anki -Version: 2.0.52 -Release: 3%{?dist} +Version: 2.1.13 +Release: 1%{?dist} Summary: Flashcard program for using space repetition learning -License: AGPLv3+ and GPLv3+ and MIT and BSD +License: AGPLv3+ and GPLv3+ and LGPLv3 and MIT and BSD and ASL 2.0 and CC-BY-SA and CC-BY URL: https://apps.ankiweb.net/ Source0: https://apps.ankiweb.net/downloads/current/anki-%{version}-source.tgz Source1: anki.svg @@ -13,21 +11,18 @@ Source2: anki.appdata.xml # Config change: don't check for new updates. Patch0: anki-2.0.3-noupdate.patch -# The supplied CA store does not include the root CAs for the -# add-ons server when SNI is used by python's httplib2 -Patch1: anki-2.0.50-use-system-certificates.patch -# Use /usr/bin/python2 as shebang as required by -# https://fedoraproject.org/wiki/Packaging:Python -Patch2: anki-2.0.50-use-python2-shebang.patch -BuildRequires: python2-devel, python-setuptools, python-sqlalchemy -BuildRequires: desktop-file-utils, PyQt4, python-simplejson +BuildRequires: python3-devel, python3-setuptools +%global __python %{__python3} +BuildRequires: desktop-file-utils, libappstream-glib +BuildRequires: python3-simplejson Requires: hicolor-icon-theme -Requires: qt4, PyQt4, PyQt4-webkit -Requires: python-sqlalchemy, python-simplejson -Requires: python-matplotlib -Requires: python2-send2trash -Requires: pygame, python-BeautifulSoup, python-httplib2 -Requires: pyaudio, sox +Requires: python3-qt5, python3-qt5-webengine, python3-qt5-webkit +Requires: python3-sqlalchemy, python3-simplejson +Requires: python3-matplotlib, python3-decorator +Requires: python3-markdown +Requires: python3-send2trash, python3-requests +Requires: python3-pygame, python3-beautifulsoup4, python3-httplib2 +Requires: python3-pyaudio, python3-jsonschema, sox BuildArch: noarch %description @@ -37,23 +32,13 @@ as possible. Anki is based on a theory called spaced repetition. %prep %autosetup -p 1 -rm -rf thirdparty %build %install -mkdir -p %{buildroot}%{_datadir}/%{name} -cp -R aqt %{buildroot}%{_datadir}/%{name}/ -cp -R designer %{buildroot}%{_datadir}/%{name}/ -cp -R anki %{buildroot}%{_datadir}/%{name}/ -cp -R locale %{buildroot}%{_datadir}/%{name}/ - -install -d %{buildroot}%{_bindir} -install -m 755 runanki %{buildroot}%{_bindir}/anki - -install -d %{buildroot}%{_pkgdocdir} -install -m 644 LICENSE* %{buildroot}%{_pkgdocdir}/ -install -m 644 README* %{buildroot}%{_pkgdocdir}/ +DESTDIR=%{buildroot} make install +# Use only SVG icon +rm -rf %{buildroot}%{_datadir}/pixmaps install -d %{buildroot}%{_datadir}/mime/packages install -m 644 anki.xml %{buildroot}%{_datadir}/mime/packages @@ -61,11 +46,9 @@ install -m 644 anki.xml %{buildroot}%{_datadir}/mime/packages install -d %{buildroot}%{_datadir}/icons/hicolor/scalable/apps install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/ -install -d %{buildroot}%{_mandir}/man1 -install -m 644 anki.1 %{buildroot}%{_mandir}/man1/ - -mkdir -p %{buildroot}%{_datadir}/appdata -install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/appdata/ +mkdir -p %{buildroot}%{_metainfodir} +install -m 644 %{SOURCE2} %{buildroot}%{_metainfodir} +appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml desktop-file-install \ --remove-category=KDE \ @@ -76,7 +59,7 @@ desktop-file-install \ find %{buildroot} -type f -o -type l|sed ' s:'"%{buildroot}"':: s:\(.*/share/anki/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: -s:\(.*/share/anki/locale/qt_\)\([^.]\+\)\(\.qm\):%lang(\2) \1\2\3: +s:\(.*/share/anki/locale/qt\)\([^.]\+\)\(\.qm\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: /^$/d' > anki.lang @@ -85,20 +68,28 @@ find %{buildroot}/usr/share/anki/locale -type d|sed ' s:'"%{buildroot}"':: s:\(.*\):%dir \1:' >>anki.lang +# Remove license files from docdir, they will be copied to separately via %%license +rm -f %{buildroot}%{_pkgdocdir}/LICENSE* + %files -f %{name}.lang -%doc LICENSE* README* +%license LICENSE* +%doc README* %{_bindir}/anki %dir %{_datadir}/%{name}/ %{_datadir}/%{name}/aqt/ -%{_datadir}/%{name}/designer/ +%{_datadir}/%{name}/web/ %{_datadir}/%{name}/anki/ %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/scalable/apps/%{name}.* %{_datadir}/mime/packages/anki.xml %{_mandir}/man1/%{name}.* -%{_datadir}/appdata/anki.appdata.xml +%{_metainfodir}/anki.appdata.xml %changelog +* Thu Jun 06 2019 Christian Krause - 2.1.13-1 +- Update to new major upstream version 2.1.13 (BZ 1612847) +- Spec file cleanup + * Thu Jan 31 2019 Fedora Release Engineering - 2.0.52-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 39c4e42..9c8212f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (anki-2.0.52-source.tgz) = 5130f6a90860d7e4de6cbf4401ab61c841e3d27cbcb2f62b45f807902e332e37fd7892a8688ad92ef1fae62360076530f480dfd6396b1cc0289ca8a52019ef05 +SHA512 (anki-2.1.13-source.tgz) = 921ef48b16c0c8c83b85523aa0a5b828210b210cd51fa471f57e9aa6777a1aced30c7e24084ef0c2f14c9d846a19091923d13faaff7ed9075860fc23f8ba1cd3