# Maintainer: Fabian Maurer # Contributor: Martin Dünkelmann # Contributor: Shaoyu Tseng # Contributor: Daniel Egeberg # Contributor: Sergej Pupykin # Contributor: Timm Preetz # Contributor: Michael 'manveru' Fellinger # Contributor: Dave Pretty pkgname=anki-git pkgver=r10935.eb597475c pkgrel=1 pkgdesc="Helps you remember facts (like words/phrases in a foreign language) efficiently" url="hhttps://apps.ankiweb.net/" license=('AGPL3') arch=('any') provides=('anki') conflicts=('anki' 'anki20' 'anki-official-binary-bundle') depends=( # anki and aqt 'python-beautifulsoup4' 'python-requests' 'python-wheel' # anki 'python-pysocks' # requests[socks] 'python-decorator' 'python-protobuf' 'python-orjson' 'python-distro' 'python-stringcase' 'python-pip-system-certs' # aqt 'python-send2trash' 'python-markdown' 'python-jsonschema' 'python-pyaudio' 'python-pyqtwebengine' 'python-flask' 'python-flask-cors' 'python-waitress' 'python-pyqt6' 'python-pyqt6-webengine' ) makedepends=( 'git' 'rsync' 'ninja' 'clang' 'rust' 'libxcrypt-compat' 'python-pip' 'npm' ) optdepends=( 'lame: record sound' 'mpv: play sound. prefered over mplayer' 'mplayer: play sound' ) source=('git+https://github.com/ankitects/anki.git') sha512sums=('SKIP') pkgver() { cd anki printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { cd anki # Put translations in place. #ln -sf "$srcdir"/ankitects-anki-core-i18n-*/ rslib/ftl/repo #ln -sf "$srcdir"/ankitects-anki-desktop-ftl-*/ qt/ftl/repo #ln -sf "$srcdir"/ankitects-anki-desktop-i18n-*/ qt/po/repo } build() { cd anki export CC=/usr/bin/clang export CXX=/usr/bin/clang++ export PROTOC_BINARY=$(which protoc) ./tools/build } package() { cd anki PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-warn-script-location --root-user-action=ignore --no-deps out/wheels/*.whl install -Dm755 qt/runanki.py "$pkgdir"/usr/bin/anki 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 }