Skip to content

Instantly share code, notes, and snippets.

@YamashitaRen YamashitaRen/PKGBUILD
Last active Feb 28, 2017

Embed
What would you like to do?
Anki
# $Id$
# Maintainer: Yamashita Ren
# Contributor: Sławomir Kowalski <suawekk+aur@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Timm Preetz <timm@preetz.us>
# Contributor: Michael 'manveru' Fellinger <m.fellinger@gmail.com>
# Contributor: Dave Pretty <david dot pretty at gmail dot com>
pkgname=anki20
pkgver=2.0.43
pkgrel=1
pkgdesc="Helps you remember facts (like words/phrases in a foreign language) efficiently"
url="http://ankisrs.net/"
license=('AGPL3')
arch=('x86_64')
depends=('icu48')
optdepends=('mplayer: sound playing')
options=(!strip)
source=(https://apps.ankiweb.net/downloads/current/anki-$pkgver-amd64.tar.bz2)
sha256sums=('8b4174e8c6c5f4ee61c29a7c6270709a959d605ab77588b0f5be3fed216156fa')
prepare() {
cd "$srcdir"/anki-$pkgver
sed -e 's|PREFIX=/usr/local|PREFIX='$pkgdir'/usr|' \
-e /install:/,/uninstall:/{'/rm -rf/d'} \
-e '/ln -sf ${PREFIX}\/share\/anki\/bin\/anki ${PREFIX}\/bin\//d' \
-e '/xdg-mime/d' \
-i Makefile
}
package() {
cd "$srcdir"/anki-$pkgver
make install
cd "$pkgdir"/usr
echo -e '#!/bin/bash\n\ncd /usr/share/anki/bin\n./anki' > bin/anki
chmod +x bin/anki
rm share/anki/Makefile
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.