desktop/anki/PKGBUILD

46 lines
1.5 KiB
Bash
Raw Normal View History

pkgname=anki
2015-04-30 04:26:54 +08:00
pkgver=2.0.32
2014-04-13 02:04:19 +08:00
pkgrel=1
pkgdesc='Helps you remember facts (like words/phrases in a foreign language) efficiently.'
url='http://ankisrs.net/'
2012-11-12 04:59:59 +08:00
license=('GPL3')
arch=('x86_64')
categories=('utils')
screenshot=("http://ankisrs.net/shots/sync.png")
install='anki.install'
2014-09-22 18:42:41 +08:00
depends=('python2-beautifulsoup3' 'python2-pyqt4' 'python-pysqlite' 'python2-simplejson' 'python2-sqlalchemy')
2013-12-16 02:15:32 +08:00
optdepends=('python2-matplotlib: show graphs.'
2012-09-07 15:00:53 +08:00
'sox: audio recording.'
2013-12-16 02:15:32 +08:00
'python2-pyaudio: audio recording.')
source=("http://ankisrs.net/download/mirror/$pkgname-$pkgver.tgz")
2015-04-30 04:26:54 +08:00
sha512sums=('a65a529121e8d6ca53b29ef3b22d432b48884c28ef5b2422f0c813069f5889469e0545951f6789aa883a411572419e7175364320a18a7cfc1582f5fa98b837d3')
2012-11-12 04:59:59 +08:00
2015-04-30 04:26:54 +08:00
prepare() {
2012-11-12 04:59:59 +08:00
cd $srcdir/anki-$pkgver
sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' runanki
2012-11-12 04:59:59 +08:00
rm -f anki.bat
2015-04-30 04:26:54 +08:00
# 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
2012-11-12 04:59:59 +08:00
}
package() {
2012-09-07 15:00:53 +08:00
cd "${srcdir}/${pkgname}-${pkgver}"
2015-04-30 04:26:54 +08:00
install -d $pkgdir/usr/{bin,share/{anki,pixmaps,applications,man/man1}}
2015-04-30 04:26:54 +08:00
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/
}