updated on Wed Jan 25 08:34:36 UTC 2012
[aur-mirror.git] / befungee-git / PKGBUILD
blobc8b40e0e2464af39f936e4f96e41439111116b00
1 # Maintainer: Your Name <youremail@domain.com>
2 pkgname=befungee-git
3 pkgver=20111120
4 pkgrel=1
5 pkgdesc="Befunge-93 interpreter written in Python with a built-in debugger"
6 arch=("any")
7 url="https://github.com/programble/befungee"
8 license=("GPL")
9 depends=("python2")
10 makedepends=("git")
11 # provides=()
12 # conflicts=()
13 # replaces=()
14 # backup=()
15 options=(!emptydirs)
16 # install=
17 source=()
18 md5sums=()
20 _gitroot=https://github.com/programble/befungee.git
21 _gitname=befungee
23 build() {
24     cd "$srcdir"
25     msg "Connecting to GIT server...."
27     if [[ -d "$_gitname" ]]; then
28         cd "$_gitname" && git pull origin
29         msg "The local files are updated."
30     else
31         git clone "$_gitroot" "$_gitname"
32     fi
34     msg "GIT checkout done or server timeout"
35     msg "Starting build..."
37     rm -rf "$srcdir/$_gitname-build"
38     git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
41 package() {
42     cd "$srcdir/$_gitname-build"
44     sed -e "1s/python/python2/" -i befungee.py
45     sed -e "1d" -i boards.py funge.py
46     sed -e "/import sys/asys.path.append(\"/usr/lib/befungee\")" -i befungee.py
48     install -m755 -d "$pkgdir/usr/share/befungee"
49     cp -R examples "$pkgdir/usr/share/befungee"
50     install -m755 -D befungee.py "$pkgdir/usr/bin/befungee"
51     install -m644 -D boards.py "$pkgdir/usr/lib/befungee/boards.py"
52     install -m644 funge.py "$pkgdir/usr/lib/befungee/funge.py"