pkgname=anki pkgver=2.0.47 pkgrel=1 pkgdesc='Helps you remember facts (like words/phrases in a foreign language) efficiently.' url='https://apps.ankiweb.net/' license=('GPL3') arch=('x86_64') categories=('utils') install='anki.install' depends=('python2-beautifulsoup3' 'python2-pyqt4' 'python-pysqlite' 'python2-simplejson' 'python2-sqlalchemy') optdepends=('python2-matplotlib: show graphs.' 'sox: audio recording.' 'python2-pyaudio: audio recording.') source=("https://apps.ankiweb.net/downloads/current/anki-$pkgver-source.tgz") sha256sums=('fbb5356d642a94a2cb2fb7f949e6db7c8acbe322f38a18c0603ff88f5bd4eb18') prepare() { cd $pkgname-$pkgver sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' runanki rm -f anki.bat # Desktop integration. KDE needs Qt in Categories desktop-file-install --dir $pkgdir/usr/share/applications \ --add-category='Qt' \ $pkgname.desktop sed s/TryExec=anki/TryExec=runanki/ -i anki.desktop sed s/Exec=anki/Exec=runanki/ -i anki.desktop } package() { cd $pkgname-$pkgver install -d $pkgdir/usr/{bin,share/{anki,pixmaps,applications,man/man1}} mv runanki $pkgdir/usr/bin/runanki mv anki.xpm $pkgdir/usr/share/pixmaps/anki.xpm mv anki.png $pkgdir/usr/share/pixmaps/anki.png mv anki.desktop $pkgdir/usr/share/applications/anki.desktop mv anki.1 $pkgdir/usr/share/man/man1/anki.1 cp -av * $pkgdir/usr/share/anki/ }