desktop/anki/PKGBUILD

47 lines
1.5 KiB
Bash
Raw Normal View History

# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves gmail.com>
pkgname=anki
2014-04-13 02:04:19 +08:00
pkgver=2.0.24
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'
2013-12-16 02:15:32 +08:00
depends=('python2-beautifulsoup' 'python2-pyqt4' 'python-pysqlite' 'python2-simplejson' 'python2-sqlalchemy')
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")
2014-04-13 02:04:19 +08:00
md5sums=('d88b24976f79c23c7d10d1d203234969')
2012-11-12 04:59:59 +08:00
build() {
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
}
package() {
2012-09-07 15:00:53 +08:00
cd "${srcdir}/${pkgname}-${pkgver}"
2012-11-12 04:59:59 +08:00
mkdir -p $pkgdir/usr/{bin,share/{anki,pixmaps,applications,man/man1}}
cp -av * $pkgdir/usr/share/anki/
2012-09-07 15:00:53 +08:00
# Desktop integration. KDE needs Qt in Categories
2014-02-11 00:42:44 +08:00
desktop-file-install --dir "${pkgdir}/usr/share/applications" \
2012-09-07 15:00:53 +08:00
--add-category='Qt' \
${pkgname}.desktop
2012-11-12 04:59:59 +08:00
cd $pkgdir/usr/share/anki && (
mv runanki ../../bin/
2012-11-12 04:59:59 +08:00
mv anki.xpm anki.png ../pixmaps/
mv anki.desktop ../applications/
mv anki.1 ../man/man1/
)
sed s/TryExec=anki/TryExec=runanki/ -i $pkgdir/usr/share/applications/anki.desktop
2014-02-11 02:16:42 +08:00
sed s/Exec=anki/Exec=runanki/ -i $pkgdir/usr/share/applications/anki.desktop
}