blob: d465a54ab83364d200fec7c0e54709f9356fab44 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# Maintainer: Alexander Bocken <alexander@bocken.org>
# Contributor: Posi <posi1981@gmail.com>
# Contributor: Johannes Löthberg <johannes@kyriasis.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Timm Preetz <timm@preetz.us>
# Contributor: Michael 'manveru' Fellinger <m.fellinger@gmail.com>
# Contributor: Dave Pretty <david dot pretty at gmail dot com>
pkgname=anki
pkgver=2.1.60
pkgrel=1
pkgdesc="Helps you remember facts (like words/phrases in a foreign language) efficiently"
url="https://apps.ankiweb.net/"
license=('AGPL3')
arch=('x86_64')
conflicts=('anki-bin' 'anki-git' 'anki-official-binary-bundle' 'anki-qt5')
options=('!lto')
depends=(
# anki & aqt
'python-beautifulsoup4'
'python-waitress'
# anki
'python-decorator'
'python-markdown'
'python-orjson'
'python-protobuf'
'python-pysocks'
'python-distro'
#aqt
'python-flask-cors' # python-flask required for anki & aqt but a dependency of -cors
'python-jsonschema'
'python-requests'
'python-send2trash'
'python-certifi'
'qt6-multimedia' # recording voice
'python-pyqt6-webengine'
'qt6-svg'
)
makedepends=(
'rsync'
'ninja'
'git'
'cargo'
'python-installer'
'libxcrypt-compat'
'nodejs'
)
optdepends=(
'lame: record sound'
'mpv: play sound. prefered over mplayer'
'mplayer: play sound'
'texlive-most: render LaTex in cards'
)
# 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::git+https://github.com/ankitects/anki#tag=${pkgver}"
"no-update.patch"
)
sha256sums=('SKIP'
'137827586d2a72adddaaf98599afa9fc80cdd73492d7f5cbcf4d2f6082e5f797'
)
prepare(){
cd "anki"
# 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"
./tools/build
}
package() {
cd "anki"
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
}
|