Skip to content

Commit

Permalink
gocode-git: fix for new (lack of a) build sys
Browse files Browse the repository at this point in the history
  • Loading branch information
falconindy committed Feb 13, 2012
1 parent 20fe963 commit a4c7356
Showing 1 changed file with 3 additions and 27 deletions.
30 changes: 3 additions & 27 deletions gocode-git/PKGBUILD
@@ -1,7 +1,7 @@
# Contributor: Dave Reisner <d@falconindy.com>

pkgname=gocode-git
pkgver=20110409
pkgver=20120212
pkgrel=1
pkgdesc="An autocompletion/refactoring daemon for the Go programming language (for use in Vim)"
arch=(i686 x86_64)
Expand All @@ -16,31 +16,7 @@ options=(!strip)
_gitroot="git://github.com/nsf/gocode.git"
_gitname="gocode"

build() {
cd "$srcdir"
msg "Connecting to GIT server...."

if [[ -d $_gitname ]] ; then
( cd "$_gitname" && git pull origin; )
msg "The local files are updated."
else
git clone "$_gitroot" "$_gitname"
fi

msg "GIT checkout done or server timeout"
msg "Starting make..."

rm -rf "$srcdir/$_gitname-build"
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
cd "$srcdir/$_gitname-build"

make
}

package() {
cd "$srcdir/$_gitname-build"

install -Dm755 gocode "$pkgdir/usr/bin/gocode"
install -Dm644 vim/autoload/gocomplete.vim "$pkgdir/usr/share/vim/vimfiles/autoload/gocomplete.vim"
install -Dm644 vim/ftplugin/go.vim "$pkgdir/usr/share/vim/vimfiles/ftplugin/go.vim"
install -dm755 "$pkgdir/usr/bin"
GOBIN="$pkgdir/usr/bin" go get -u github.com/nsf/gocode
}

0 comments on commit a4c7356

Please sign in to comment.