Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # $Id$
- # Maintainer: Tobi Fankhänel <tobi at mail dot upb dot de>
- # Contributor: Sergej Pupykin <pupykin.s+arch at gmail dot com>
- # Contributor: Timm Preetz <timm at preetz dot us>
- # Contributor: Michael 'manveru' Fellinger <m.fellinger at gmail dot com>
- # Contributor: Dave Pretty <david dot pretty at gmail dot com>
- # Contributor: flowerfairy <ktj-arch ατ ktrask δοτ de>
- pkgname=anki-git
- pkgver=20130402
- pkgrel=1
- pkgdesc="Helps you remember facts efficiently. Git Version."
- url="https://github.com/dae/anki"
- license=('GPL')
- arch=('any')
- depends=('python2-pyqt' 'python2-sqlalchemy' 'python2-simplejson'
- 'python2-pysqlite' 'python2-beautifulsoup3')
- makedepends=('git')
- optdepends=('python2-matplotlib: show graphs'
- 'sox: audio recording'
- 'portaudio')
- provides=('anki')
- conflicts=('anki' 'ankiqt-git')
- install=anki-git.install
- _gitroot="git://github.com/dae/anki.git"
- _gitname="anki"
- # Uncomment first three lines and last line as soon as pacman 4.1 has been released,
- # and leave the pkgver above empty.
- # pkgver() {
- # cd "${srcdir}/${_gitname}"
- # echo $(git describe --always | sed 's/-/./g')
- # for git, if the repo has no tags, comment out the above and uncomment the next line:
- #echo "$(git shortlog | grep -c '\s\+').$(git describe --always)"
- # This will give you a count of the total commits and the hash of the commit you are on.
- # Useful if you're making a repository with git packages so that they can have sequential
- # version numbers. (Else a pacman -Syu may not update the package)
- # }
- build() {
- cd "$srcdir"
- msg "Connecting to GIT server..."
- if [[ -d ${_gitname} ]]; then
- (cd ${_gitname} && git pull origin)
- else
- git clone ${_gitroot} ${_gitname}
- fi
- msg "GIT checkout done or server timeout"
- msg "Starting make..."
- rm -rf ${_gitname}-build
- git clone ${_gitname} ${_gitname}-build
- cd "$srcdir"/${_gitname}-build
- sed -i 's|pyuic4 $i -o $py|python2-pyuic4 $i -o $py|' tools/build_ui.sh
- ./tools/build_ui.sh
- sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' runanki
- rm -f anki.bat
- }
- package() {
- cd "$srcdir"/${_gitname}-build
- mkdir -p "$pkgdir"/usr/{bin,share/{anki,pixmaps,applications,man/man1}}
- cp -a * "$pkgdir"/usr/share/anki/
- cd "$pkgdir"/usr/share/anki && (
- mv runanki ../../bin/anki
- mv anki.xpm anki.png ../pixmaps/
- mv anki.desktop ../applications/
- mv anki.1 ../man/man1/
- )
- rm -f "$pkgdir"/usr/share/anki/thirdparty/py*/_portaudio.so
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement