mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
47 lines
1.5 KiB
Bash
47 lines
1.5 KiB
Bash
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves gmail.com>
|
|
|
|
pkgname=anki
|
|
pkgver=2.0.24
|
|
pkgrel=1
|
|
pkgdesc='Helps you remember facts (like words/phrases in a foreign language) efficiently.'
|
|
url='http://ankisrs.net/'
|
|
license=('GPL3')
|
|
arch=('x86_64')
|
|
categories=('utils')
|
|
screenshot=("http://ankisrs.net/shots/sync.png")
|
|
install='anki.install'
|
|
depends=('python2-beautifulsoup' 'python2-pyqt4' 'python-pysqlite' 'python2-simplejson' 'python2-sqlalchemy')
|
|
optdepends=('python2-matplotlib: show graphs.'
|
|
'sox: audio recording.'
|
|
'python2-pyaudio: audio recording.')
|
|
source=("http://ankisrs.net/download/mirror/$pkgname-$pkgver.tgz")
|
|
md5sums=('d88b24976f79c23c7d10d1d203234969')
|
|
|
|
build() {
|
|
cd $srcdir/anki-$pkgver
|
|
sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' runanki
|
|
rm -f anki.bat
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
|
|
mkdir -p $pkgdir/usr/{bin,share/{anki,pixmaps,applications,man/man1}}
|
|
cp -av * $pkgdir/usr/share/anki/
|
|
|
|
# Desktop integration. KDE needs Qt in Categories
|
|
desktop-file-install --dir "${pkgdir}/usr/share/applications" \
|
|
--add-category='Qt' \
|
|
${pkgname}.desktop
|
|
|
|
cd $pkgdir/usr/share/anki && (
|
|
mv runanki ../../bin/
|
|
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
|
|
sed s/Exec=anki/Exec=runanki/ -i $pkgdir/usr/share/applications/anki.desktop
|
|
|
|
}
|