updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / gocode-git / PKGBUILD
blobd78e7f246bf85b4c6b777f7dacd573a43a84b50c
1 # Contributor: Dave Reisner <d@falconindy.com>
3 pkgname=gocode-git
4 pkgver=20110102
5 pkgrel=1
6 pkgdesc="An autocompletion/refactoring daemon for the Go programming language (for use in Vim)"
7 arch=(i686 x86_64)
8 url="http://github.com/nsf/gocode"
9 license=('GPL')
10 depends=('go-hg')
11 provides=('gocode')
12 conflicts=('gocode')
13 makedepends=('git')
14 options=(!strip)
16 _gitroot="git://github.com/nsf/gocode.git"
17 _gitname="gocode"
19 build() {
20   cd "$srcdir"
21   msg "Connecting to GIT server...."
23   if [[ -d $_gitname ]] ; then
24     ( cd "$_gitname" && git pull origin; )
25     msg "The local files are updated."
26   else
27     git clone "$_gitroot" "$_gitname"
28   fi
30   msg "GIT checkout done or server timeout"
31   msg "Starting make..."
33   rm -rf "$srcdir/$_gitname-build"
34   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
35   cd "$srcdir/$_gitname-build"
37   make
40 package() {
41   cd "$srcdir/$_gitname-build"
43   install -Dm755 gocode "$pkgdir/usr/bin/gocode"
44   install -Dm644 vim/autoload/gocomplete.vim "$pkgdir/usr/share/vim/vimfiles/autoload/gocomplete.vim"
45   install -Dm644 vim/ftplugin/go.vim "$pkgdir/usr/share/vim/vimfiles/ftplugin/go.vim"