From aba507198fa48287422fea0e999c8bd8d9d9f2ea Mon Sep 17 00:00:00 2001 From: windowsboy111 Date: Wed, 11 Jan 2023 15:57:39 +0800 Subject: [PATCH 1/3] Fix anki (again) --- anda/apps/anki/anki.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/anda/apps/anki/anki.spec b/anda/apps/anki/anki.spec index 5cae07cd62..cff8cf7447 100644 --- a/anda/apps/anki/anki.spec +++ b/anda/apps/anki/anki.spec @@ -38,7 +38,9 @@ done install -Dm644 qt/bundle/lin/anki.desktop %{buildroot}/%{_datadir}/applications/anki.desktop install -Dm644 qt/bundle/lin/anki.png %{buildroot}/%{_datadir}/pixmaps/anki.png -sed "s*^#!/usr/bin/python\$*#!/usr/bin/python3*" %{buildroot}/%{_bindir}/anki > %{buildroot}/%{_bindir}/anki +sed "s*^#!/usr/bin/python\$*#!/usr/bin/python3*" %{buildroot}/%{_bindir}/anki > %{buildroot}/%{_bindir}/anki1 +rm %{buildroot}/%{_bindir}/anki +mv %{buildroot}/%{_bindir}/anki1 %{buildroot}/%{_bindir}/anki find %{buildroot} -iname __pycache__ | xargs -r rm -rf find %{buildroot} -iname direct_url.json | xargs -r rm -rf From de51e4335aebd8fa858419da5cd79bacd2956121 Mon Sep 17 00:00:00 2001 From: windowsboy111 Date: Wed, 11 Jan 2023 15:59:42 +0800 Subject: [PATCH 2/3] Add anda-bin --- anda/apps/anki-bin/anki-bin.spec | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 anda/apps/anki-bin/anki-bin.spec diff --git a/anda/apps/anki-bin/anki-bin.spec b/anda/apps/anki-bin/anki-bin.spec new file mode 100644 index 0000000000..fbae95f987 --- /dev/null +++ b/anda/apps/anki-bin/anki-bin.spec @@ -0,0 +1,45 @@ +Name: anki-bin +Version: 2.1.56 +Release: %autorelease +Summary: Flashcard program for using space repetition learning (Installed with wheel) +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/ +BuildRequires: python3-installer +Requires: hicolor-icon-theme python3-sqlalchemy python3-simplejson python3-matplotlib python3-decorator python3-markdown python3-send2trash +Requires: python3-requests python3-pygame python3-beautifulsoup4 python3-httplib2 python3-pyaudio python3-jsonschema sox libxcrypt-compat +BuildArch: noarch +Conflicts: anki +Source0: https://files.pythonhosted.org/packages/cp39/a/anki/anki-%{version}-cp39-abi3-manylinux_2_28_%{_arch}.whl +Source1: https://files.pythonhosted.org/packages/py3/a/aqt/aqt-%{version}-py3-none-any.whl +Source2: https://raw.githubusercontent.com/ankitects/anki/%{version}/qt/runanki.py +Source3: https://raw.githubusercontent.com/ankitects/anki/%{version}/qt/bundle/lin/anki.desktop +Source4: https://raw.githubusercontent.com/ankitects/anki/%{version}/qt/bundle/lin/anki.png + +%description +Anki is a program designed to help you remember facts (such as words +and phrases in a foreign language) as easily, quickly and efficiently +as possible. Anki is based on a theory called spaced repetition. + +%prep +%autosetup + + +%build + + +%install +python -m installer --destdir="%{buildroot}" %{SOURCE0} +python -m installer --destdir="%{buildroot}" %{SOURCE1} +install -Dm755 %{SOURCE2} "%{buildroot}/usr/bin/anki" +install -Dm644 %{SOURCE3} "%{buildroot}/usr/share/applications/anki.desktop" +install -Dm644 %{SOURCE4} "%{buildroot}/usr/share/pixmaps/anki.png" + + +%files +%license LICENSE* +%doc README* + + +%changelog +* Wed Jan 11 2023 windowsboy111 +- Initial package From bbf575d9c1741cdd52b6a1fbfc7ac7d4a6018f61 Mon Sep 17 00:00:00 2001 From: windowsboy111 Date: Wed, 11 Jan 2023 18:22:24 +0800 Subject: [PATCH 3/3] Fix anki-bin --- anda/apps/anki-bin/anda.hcl | 5 +++++ anda/apps/anki-bin/anki-bin.spec | 28 ++++++++++++++++++---------- anda/apps/anki-bin/update.rhai | 1 + 3 files changed, 24 insertions(+), 10 deletions(-) create mode 100644 anda/apps/anki-bin/anda.hcl create mode 100644 anda/apps/anki-bin/update.rhai diff --git a/anda/apps/anki-bin/anda.hcl b/anda/apps/anki-bin/anda.hcl new file mode 100644 index 0000000000..162cf64da4 --- /dev/null +++ b/anda/apps/anki-bin/anda.hcl @@ -0,0 +1,5 @@ +project "pkg" { + rpm { + spec = "anki-bin.spec" + } +} diff --git a/anda/apps/anki-bin/anki-bin.spec b/anda/apps/anki-bin/anki-bin.spec index fbae95f987..37c526a824 100644 --- a/anda/apps/anki-bin/anki-bin.spec +++ b/anda/apps/anki-bin/anki-bin.spec @@ -1,10 +1,10 @@ Name: anki-bin Version: 2.1.56 -Release: %autorelease +Release: 2%{?dist} Summary: Flashcard program for using space repetition learning (Installed with wheel) 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/ -BuildRequires: python3-installer +BuildRequires: python3-installer python3.11 Requires: hicolor-icon-theme python3-sqlalchemy python3-simplejson python3-matplotlib python3-decorator python3-markdown python3-send2trash Requires: python3-requests python3-pygame python3-beautifulsoup4 python3-httplib2 python3-pyaudio python3-jsonschema sox libxcrypt-compat BuildArch: noarch @@ -14,6 +14,8 @@ Source1: https://files.pythonhosted.org/packages/py3/a/aqt/aqt-%{version}-py3-n Source2: https://raw.githubusercontent.com/ankitects/anki/%{version}/qt/runanki.py Source3: https://raw.githubusercontent.com/ankitects/anki/%{version}/qt/bundle/lin/anki.desktop Source4: https://raw.githubusercontent.com/ankitects/anki/%{version}/qt/bundle/lin/anki.png +Source5: https://raw.githubusercontent.com/ankitects/anki/%{version}/LICENSE +Source6: https://raw.githubusercontent.com/ankitects/anki/%{version}/README.md %description Anki is a program designed to help you remember facts (such as words @@ -21,24 +23,30 @@ and phrases in a foreign language) as easily, quickly and efficiently as possible. Anki is based on a theory called spaced repetition. %prep -%autosetup - %build - %install -python -m installer --destdir="%{buildroot}" %{SOURCE0} -python -m installer --destdir="%{buildroot}" %{SOURCE1} +python3.11 -m installer --destdir="%{buildroot}" %{SOURCE0} +python3.11 -m installer --destdir="%{buildroot}" %{SOURCE1} install -Dm755 %{SOURCE2} "%{buildroot}/usr/bin/anki" install -Dm644 %{SOURCE3} "%{buildroot}/usr/share/applications/anki.desktop" install -Dm644 %{SOURCE4} "%{buildroot}/usr/share/pixmaps/anki.png" +install -Dm644 %{SOURCE5} "%{buildroot}/%{_datadir}/licenses/%{name}/LICENSE" +install -Dm644 %{SOURCE6} "%{buildroot}/%{_datadir}/doc/%{name}/README.md" %files -%license LICENSE* -%doc README* - +%license LICENSE +%doc README.md +/usr/bin/anki +/usr/lib64/python*/site-packages/_aqt/ +/usr/lib64/python*/site-packages/anki-%{version}.dist-info/ +/usr/lib64/python*/site-packages/anki/ +/usr/lib64/python*/site-packages/aqt-%{version}.dist-info/ +/usr/lib64/python*/site-packages/aqt/ +/usr/share/applications/anki.desktop +/usr/share/pixmaps/anki.png %changelog * Wed Jan 11 2023 windowsboy111 diff --git a/anda/apps/anki-bin/update.rhai b/anda/apps/anki-bin/update.rhai new file mode 100644 index 0000000000..06eb9c5883 --- /dev/null +++ b/anda/apps/anki-bin/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("ankitects/anki"));