Name: anki Version: 24.06.3 Release: 1%{?dist} Summary: Flashcard program for using space repetition learning License: AGPL-3.0-or-later URL: https://apps.ankiweb.net/ BuildRequires: desktop-file-utils, libappstream-glib binutils BuildRequires: python3-devel git nodejs yarn rsync BuildRequires: pip rust cargo ninja-build protobuf-compiler Requires: mpv ExclusiveArch: x86_64 %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. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Development files for %{name} %global debug_package %{nil} %prep rm -rf %{name}-%{version} git clone https://github.com/ankitects/%{name} %{name}-%{version} %build _caches_yarn="yarn-cache" _caches_cargo="cargo-cache" export PYTHONWARNINGS=default export PYTHONPYCACHEPREFIX=out/pycache export ANKIDEV=1 export YARN_CACHE_FOLDER="%{_builddir}/%{name}-%{version}/$_caches_yarn" #use local binaries instead of downloading them export PYTHON_BINARY=%{python3} export PROTOC_BINARY=$(which protoc) export NODE_BINARY=$(which node) export YARN_BINARY=$(which yarn) export CARGO_HOME="%{_builddir}/%{name}-%{version}/$_caches_cargo" export RELEASE=2 export LDFLAGS="$LDFLAGS -fuse-ld=lld" cd %{name}-%{version} ./tools/build %install pip install \ --upgrade %{name}-%{version}/out/wheels/*.whl \ --target %{buildroot}%{python3_sitelib}/%{name} mkdir -p %{buildroot}%{_bindir} ln -sf ../..%{python3_sitelib}/%{name}/bin/%{name} %{buildroot}%{_bindir}/%{name} mkdir -p %{buildroot}%{_datadir}/pixmaps mkdir -p %{buildroot}%{_datadir}/applications mkdir -p %{buildroot}%{_mandir}/man1 cd %{_builddir}/%{name}-%{version}/qt/bundle/lin mv -Z %{name}.xpm %{name}.png %{buildroot}%{_datadir}/pixmaps/ mv -Z %{name}.1 %{buildroot}%{_mandir}/man1/ install -D -m 644 %{name}.xml %{buildroot}%{_datadir}/mime/packages/%{name}.xml %py3_shebang_fix %{buildroot}%{python3_sitelib}/%{name}/google/protobuf/internal/_parameterized.py for py in distro/distro requests/certs sockshandler; do sed -i -e 's|^#!/usr/bin/env \+python *||' \ %{buildroot}%{python3_sitelib}/%{name}/$py.py done for f in %{name} distro flask jsonschema markdown_py normalizer send2trash waitress-serve; do sed -i -e 's#\(import sys\)#\1\nsys.path.append("%{python3_sitelib}/%{name}")#g' \ %{buildroot}%{python3_sitelib}/%{name}/bin/$f done for py in `grep --include=\*.py -rnwl '%{buildroot}%{python3_sitelib}/%{name}/' -e 'import sys'`; do sed -i -e 's#\(\( *\)import sys$\)#\1\n\2sys.path.append("%{python3_sitelib}/%{name}")#g' $py done desktop-file-install \ --remove-category=KDE \ --set-key=Keywords --set-value="learn;education;memorizing;language;flashcard;spaced repetition;" \ --dir %{buildroot}%{_datadir}/applications %{name}.desktop for f in `find %{buildroot}%{python3_sitelib}/%{name} -name '*.so'`; do strip -sv $f; done #%%find_lang %%{name} %files #-f %%{name}.lang %license %{name}-%{version}/LICENSE %doc %{name}-%{version}/README.md %{_bindir}/%{name} %{_datadir}/pixmaps/%name.??? %{_datadir}/applications/%{name}.desktop #%%{_datadir}/icons/hicolor/scalable/apps/%%{name}.* %{_datadir}/mime/packages/%{name}.xml %{python3_sitelib}/%{name} %exclude %{python3_sitelib}/%{name}/markupsafe/_speedups.c %{_mandir}/man1/%{name}.1.gz %files devel %doc %{name}-%{version}/CONTRIBUTORS %{python3_sitelib}/%{name}/markupsafe/_speedups.c %changelog * Sun Sep 01 2024 pappy - 24.06.3-1 - Latest version * Sun May 19 2024 pappy - 24.04.1-1 - Latest version, build of f40 * Fri Feb 16 2024 pappy - 23.12.1-13 - Delete require, re-rename desktop * Wed Feb 14 2024 pappy - 23.12.1-12 - Add require, rename desktop * Tue Feb 13 2024 pappy - 23.12.1-11 - Add anki to the python lib search path * Sat Feb 10 2024 pappy - 23.12.1-10 - Move python files out of the sitelib root * Tue Jan 23 2024 pappy - 23.12.1-9 - Rebuilt for Latest Anki 68 and Fedora 39 * Tue Jul 25 2023 Pappy Packager - 2.1.15-8 - Rebuilt for Latest Anki 68 and Fedora 38 - Forked from Thomas Drake-Brockman and - Christian Krause