updated on Mon Jan 16 12:07:49 UTC 2012
[aur-mirror.git] / gnugol-git / PKGBUILD
blob2a62f0042d7ef089edc27218a197cf29dce557a6
1 # Maintainer: Matt Lundin <mdl@imapmail.org>
3 pkgname=gnugol-git
4 pkgver=20110202
5 pkgrel=1
6 pkgdesc="A command line web search client supporting org-mode, markdown, and textile"
7 arch=('i686' 'x86_64')
8 url="http://gnugol.taht.net/"
9 license=('AGPL')
10 depends=('jansson' 'curl')
11 makedepends=('git')
12 provides=('gnugol')
13 source=()
14 md5sums=() 
16 _gitroot="git://github.com/dtaht/Gnugol.git"
17 _gitname="gnugol"
20 build () {
22     cd $srcdir
23     msg "Connecting to GIT server..."
24     if [[ -d $_gitname ]]; then
25         (cd $_gitname && git pull origin)
26     else
27         git clone $_gitroot $_gitname
28     fi
29     msg "GIT checkout done or server timeout"
30     msg "Starting make..."
32     rm -rf $_gitname-build
33     cp -r $_gitname $_gitname-build
34     cd $_gitname-build
35     
36     sed -i -e 's|/var/lib/gnugol|/usr/lib/gnugol|' src/include/gnugol_engines.h
38     SHAREDLIBDIR=/usr/lib/gnugol make
40     if [ -f /usr/bin/emacs ]; then
41         emacs --batch -q --no-site-file -f batch-byte-compile src/lisp/gnugol.el
42     fi
45 package () {
47     cd "$srcdir/$_gitname-build"
48     
49     install -d $pkgdir/usr/{bin/,lib/gnugol/}
50     install -Dm755 src/engines/*.so $pkgdir/usr/lib/gnugol/
51     install -Dm755 src/clients/gnugol $pkgdir/usr/bin/
53     if [ -f /usr/bin/emacs ]; then
54         install -d $pkgdir/usr/share/emacs/site-lisp/
55         install -Dm644 src/lisp/gnugol.el{,c} $pkgdir/usr/share/emacs/site-lisp/
56     fi
58     install -d $pkgdir/usr/share/man/man1/
59     gzip doc/gnugol.1
60     install -Dm644 doc/gnugol.1.gz $pkgdir/usr/share/man/man1/