1 # Maintainer: Daniel Micay <danielmicay@gmail.com>
2 # Contributor: Dave Reisner <d@falconindy.com>
7 pkgdesc="An autocompletion/refactoring daemon for the Go programming language"
9 url="https://github.com/nsf/gocode"
13 optdepends=('auto-complete: emacs autocompletion')
16 # Extra underscore to stop the automatic pkgver update
17 __gitroot="git://github.com/nsf/gocode.git"
22 msg "Connecting to GIT server...."
24 if [[ -d $__gitname ]] ; then
25 ( cd "$__gitname" && git pull origin; )
26 msg "The local files are updated."
28 git clone "$__gitroot" "$__gitname"
31 msg "GIT checkout done or server timeout"
32 msg "Starting make..."
34 rm -rf "$srcdir/$__gitname-build"
36 git clone "$srcdir/$__gitname" "$srcdir/$__gitname-build"
37 cd "$srcdir/$__gitname-build"
38 git checkout compatible-with-go-release.r60
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"