updated on Mon Jan 16 00:01:41 UTC 2012
[aur-mirror.git] / gocode / PKGBUILD
blob3fe7ffbeff49d216d90047159ac388ef687bb3ed
1 # Maintainer: Daniel Micay <danielmicay@gmail.com>
2 # Contributor: Dave Reisner <d@falconindy.com>
4 pkgname=gocode
5 pkgver=r60
6 pkgrel=3
7 pkgdesc="An autocompletion/refactoring daemon for the Go programming language"
8 arch=(i686 x86_64)
9 url="https://github.com/nsf/gocode"
10 license=('GPL')
11 depends=('go')
12 makedepends=('git')
13 optdepends=('auto-complete: emacs autocompletion')
14 options=(!strip)
16 # Extra underscore to stop the automatic pkgver update
17 __gitroot="git://github.com/nsf/gocode.git"
18 __gitname="gocode"
20 build() {
21   cd "$srcdir"
22   msg "Connecting to GIT server...."
24   if [[ -d $__gitname ]] ; then
25     ( cd "$__gitname" && git pull origin; )
26     msg "The local files are updated."
27   else
28     git clone "$__gitroot" "$__gitname"
29   fi
31   msg "GIT checkout done or server timeout"
32   msg "Starting make..."
34   rm -rf "$srcdir/$__gitname-build"
35   cd "$__gitname"
36   git clone "$srcdir/$__gitname" "$srcdir/$__gitname-build"
37   cd "$srcdir/$__gitname-build"
38   git checkout compatible-with-go-release.r60
40   make
43 package() {
44   cd "$srcdir/$__gitname-build"
46   install -Dm755 gocode "$pkgdir/usr/bin/gocode"
47   install -Dm644 vim/autoload/gocomplete.vim "$pkgdir/usr/share/vim/vimfiles/autoload/gocomplete.vim"
48   install -Dm644 vim/ftplugin/go.vim "$pkgdir/usr/share/vim/vimfiles/ftplugin/go.vim"
49   install -Dm644 emacs/go-autocomplete.el "$pkgdir/usr/share/emacs/site-lisp/go-autocomplete.el"