%global debug_package %{nil} %global _basename anki %define _qt_lib aqt %define _cpython cp39 %define _pip_source https://files.pythonhosted.org/packages/ Name: %{_basename}-bin Version: 25.7.5 %global forgeurl https://github.com/%{_basename}tects/%{_basename} %global tag 25.07.5 %global date 20250725 %forgemeta %define _glibc 36 %define anki_wheel %{_basename}-%{version}-%{_cpython}-abi3-manylinux_2_%{_glibc} %define aqt_wheel %{_qt_lib}-%{version}-py3-none-any.whl Release: 1%{?dist} Summary: Powerful, intelligent flash cards. License: AGPL-3.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND BSD-3-Clause AND CC-BY-SA-3.0 AND CC-BY-3.0 AND Apache-2.0 AND CC-BY-2.5 URL: https://apps.ankiweb.net Source0: %{forgesource} Source1: %{_pip_source}%{_cpython}/a/%{_basename}/%{anki_wheel}_x86_64.whl Source2: %{_pip_source}%{_cpython}/a/%{_basename}/%{anki_wheel}_aarch64.whl Source3: %{_pip_source}py3/a/%{_qt_lib}/%{aqt_wheel} ExclusiveArch: %{qt6_qtwebengine_arches} BuildRequires: desktop-file-utils BuildRequires: libxcrypt-compat BuildRequires: python3-devel BuildRequires: python3-installer BuildRequires: python3-pip %{?rhel:BuildRequires: pyproject-rpm-macros} Requires: python3-beautifulsoup4 Requires: python3-certifi Requires: python3-decorator Requires: python3-distro Requires: python3-flask Requires: python3-flask-cors Requires: python3-jsonschema Requires: python3-markdown Requires: python3-orjson Requires: python3-pip-system-certs Requires: python3-protobuf Requires: python3-pyqt6-webengine Requires: python3-pysocks Requires: python3-requests Requires: python3-send2trash Requires: python3-waitress Requires: hicolor-icon-theme Requires: qt6-qtsvg Requires: qt6-qtwebengine Requires: sox Recommends: lame Recommends: mplayer Recommends: mpv Provides: %{_basename} = %{version} Provides: python3-%{_basename} = %{version} Provides: python3-%{_qt_lib} = %{version} %description Anki is a program which makes remembering things easy. Because it's a lot more efficient than traditional study methods, you can either greatly decrease your time spent studying, or greatly increase the amount you learn. Anyone who needs to remember things in their daily life can benefit from Anki. Since it is content-agnostic and supports images, audio, videos and scientific markup (via LaTeX), the possibilities are endless. For example: - Learning a language - Studying for medical and law exams - Memorizing people's names and faces - Brushing up on geography - Mastering long poems - Even practicing guitar chords! %prep %forgeautosetup -p1 mkdir -p %{_pyproject_wheeldir} %ifarch x86_64 cp %{SOURCE1} %{_pyproject_wheeldir} %else %ifarch aarch64 cp %{SOURCE2} %{_pyproject_wheeldir} %endif %endif cp %{SOURCE3} %{_pyproject_wheeldir} %build #nothing %install mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_datadir}/{applications,pixmaps} mkdir -p %{buildroot}%{_datadir}/man/man1 mkdir -p %{buildroot}%{_datadir}/mime/packages install -Dm755 qt/run%{_basename}.py %{buildroot}%{_bindir}/%{_basename} install -Dm644 qt/launcher/lin/%{_basename}.desktop %{buildroot}%{_datadir}/applications/%{_basename}.desktop install -Dm644 qt/launcher/lin/%{_basename}.1 %{buildroot}%{_datadir}/man/man1/%{_basename}.1 install -Dm644 qt/launcher/lin/%{_basename}.xml %{buildroot}%{_datadir}/mime/packages/%{_basename}.xml install -Dm644 qt/launcher/lin/%{_basename}.png %{buildroot}%{_datadir}/pixmaps/%{_basename}.png install -Dm644 qt/launcher/lin/%{_basename}.xpm %{buildroot}%{_datadir}/pixmaps/%{_basename}.xpm %pyproject_install %files %license LICENSE %doc CLAUDE.md CONTRIBUTORS README.md SECURITY.md %{_bindir}/%{_basename} %{_bindir}/%{_basename}w %{python3_sitearch}/%{_basename}/ %{python3_sitearch}/%{_basename}-%{version}.dist-info %{python3_sitelib}/_%{_qt_lib}/ %{python3_sitelib}/%{_qt_lib}/ %{python3_sitelib}/%{_qt_lib}-%{version}.dist-info %{_datadir}/applications/%{_basename}.desktop %{_datadir}/man/man1/%{_basename}.* %{_datadir}/mime/packages/%{_basename}.xml %{_datadir}/pixmaps/%{_basename}.{png,xpm} %changelog * Sun Aug 10 2025 Hazel Bunny - 25.7.5-1 - Update to 25.7.5 * Fri Jun 20 2025 Hazel Bunny - 25.02.7-1 - Update to 25.02.7 * Fri Apr 25 2025 Hazel Bunny - 25.02.4-1 - Update to 25.02.4 * Mon Apr 21 2025 Hazel Bunny - 25.02.1-1 - Update to 25.02.1 * Sat Dec 21 2024 Hazel Bunny - 24.11-1 - Update to 24.11 * Fri Oct 18 2024 Hazel Bunny - 24.06.3-1 - Initial package