# Maintainer: Alexander Bocken # Contributor: Posi # Contributor: Johannes Löthberg # Contributor: Sergej Pupykin # Contributor: Timm Preetz # Contributor: Michael 'manveru' Fellinger # Contributor: Dave Pretty pkgname=anki pkgver=2.1.55 pkgrel=6 pkgdesc="Helps you remember facts (like words/phrases in a foreign language) efficiently" url="https://apps.ankiweb.net/" license=('AGPL3') arch=('x86_64') provides=('anki') conflicts=('anki-bin' 'anki-git' 'anki-official-binary-bundle' 'anki-qt5') options=('!ccache') depends=( # anki & aqt 'python-beautifulsoup4' 'python-flask' 'python-waitress' # anki 'python-decorator' 'python-markdown' 'python-orjson' 'python-protobuf' 'python-pysocks' 'python-distro' #aqt 'python-flask-cors' 'python-jsonschema' 'python-requests' 'python-send2trash' 'python-certifi' 'qt6-multimedia' # recording voice 'python-pyqt6-webengine' ) makedepends=( 'rsync' 'git' 'ninja' 'cargo' 'python-installer' 'libxcrypt-compat' ) optdepends=( 'lame: record sound' 'mpv: play sound. prefered over mplayer' 'mplayer: play sound' ) # using the tag tarballs does not work with the new (>= 2.1.55) build process. # the '.git' folder is not included in those but is required for a sucessful build source=("anki-${pkgver}::git+https://github.com/ankitects/anki#tag=${pkgver}" "no-update.patch" ) sha256sums=('SKIP' '137827586d2a72adddaaf98599afa9fc80cdd73492d7f5cbcf4d2f6082e5f797' ) prepare(){ cd "anki-$pkgver" # pro-actively prevent "module not found" error (TODO: verify whether still required) [ -d ts/node_modules ] && rm -r ts/node_modules patch -p1 < "$srcdir/no-update.patch" } build() { cd "anki-$pkgver" ./tools/build } package() { cd "anki-$pkgver" for file in out/wheels/*.whl; do python -m installer --destdir="$pkgdir" $file done install -Dm644 qt/bundle/lin/anki.desktop "$pkgdir"/usr/share/applications/anki.desktop install -Dm644 qt/bundle/lin/anki.png "$pkgdir"/usr/share/pixmaps/anki.png # TODO: verify whether still required find $pkgdir -iname __pycache__ | xargs -r rm -rf find $pkgdir -iname direct_url.json | xargs -r rm -rf }