Created
September 26, 2021 01:44
-
-
Save escape0707/4c6863838895ca920ec3c3d5764591f5 to your computer and use it in GitHub Desktop.
anki-bin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Jay Chu <tothesong@gmail.com> | |
_anki=anki | |
_aqt=aqt | |
_py=cp38 | |
pkgname=anki-bin | |
pkgver=2.1.48 | |
pkgrel=1 | |
pkgdesc='Helps you remember facts (like words/phrases in a foreign language) efficiently. | |
Installed with wheel.' | |
arch=('x86_64') | |
url='https://apps.ankiweb.net/' | |
license=('AGPL3') | |
depends=( | |
# anki and aqt | |
'python-beautifulsoup4' | |
'python-requests' | |
# aqt | |
'python-flask' | |
'python-flask-cors' | |
'python-jsonschema' | |
'python-pyqt5' | |
'python-pyqtwebengine' | |
'python-send2trash' | |
'python-waitress' | |
# anki | |
'python-decorator' | |
'python-distro' | |
'python-markdown' | |
'python-orjson' | |
'python-protobuf' | |
'python-stringcase' | |
# requests | |
'python-pysocks' | |
) | |
makedepends=( | |
'python-pip' | |
) | |
optdepends=( | |
# 'lame: record sound' | |
# 'mpv: play sound. prefered over mplayer' | |
# 'mplayer: play sound' | |
) | |
provides=(anki=$pkgver) | |
conflicts=(anki) | |
source=( | |
"https://files.pythonhosted.org/packages/$_py/${_anki::1}/$_anki/$_anki-$pkgver-$_py-abi3-manylinux2014_$arch.whl" | |
"https://files.pythonhosted.org/packages/py3/${_aqt::1}/$_aqt/$_aqt-$pkgver-py3-none-any.whl" | |
"https://github.com/ankitects/anki/raw/main/qt/runanki.py" | |
"https://github.com/ankitects/anki/raw/main/qt/linux/anki.desktop" | |
"https://github.com/ankitects/anki/raw/main/qt/linux/anki.png" | |
) | |
noextract=("${source[@]##*/}") | |
sha256sums=('7611846cc73eceda888f342e5b6f70fb3dc651505095b6a2de42001b5b2c6d93' | |
'f6171546bd09097a428acc9e50a878ccfca9176eafa09bb628a8407aa227af75' | |
'520225521a013546c521c2c8d60db3d03d7fceb6126fa61b8a70e1d2c398e4a4' | |
'5121f5877cd6fe15e262317eb2ac08a01f7039e3fd5d85e3193b4b0ff7974e13' | |
'97ad2134ef1a7686789c7becd8bd05dd8693cf0d3127951ca6ba7b29a80b402a') | |
package() { | |
PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps *.whl | |
install -Dm755 runanki.py "$pkgdir/usr/bin/anki" | |
install -Dm644 anki.desktop "$pkgdir/usr/share/applications/anki.desktop" | |
install -Dm644 anki.png "$pkgdir/usr/share/pixmaps/anki.png" | |
} |
The package is up on the AUR. https://aur.archlinux.org/packages/anki-bin/
Can you please tell me your AUR username so I can add you as a co-maintainer.
username: escape0707
email: tothesong@gmail.com
All done. I installed it with paru and it worked perfectly. Thank you.
Thanks for your efforts, too! 🚀
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for your help! As for freezing the downloaded source, it’s as easy as viewing the repo at a specific tag (for example the current release tag) and extract raw download link from there.