Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Maintainer: Daniel Micay <danielmicay@gmail.com>
- # Contributor: Dave Reisner <d@falconindy.com>
- pkgname=gocode
- _tagname=go1
- # the pkgver will match the gocode tag release(_tagname)
- pkgver=20120506
- pkgrel=1
- #epoch=1
- pkgdesc="An autocompletion/refactoring daemon for the Go programming language"
- arch=(i686 x86_64)
- url="https://github.com/nsf/gocode"
- license=('GPL')
- depends=('go')
- provides=('gocode')
- conflicts=('gocode')
- makedepends=('git')
- optdepends=('auto-complete: emacs autocompletion')
- _gitroot="https://github.com/nsf/gocode.git"
- _gitname="gocode"
- build() {
- cd "$srcdir"
- msg "Connecting to GIT server...."
- if [[ -d "$_gitname.git" ]]; then
- cd "$_gitname.git" && git pull origin
- msg "The local files are updated."
- else
- git clone "$_gitroot" "$_gitname.git"
- fi
- msg "GIT checkout done or server timeout"
- msg "Starting build..."
- rm -rf $srcdir/src
- mkdir -p $srcdir/src # let 'go' tool happy
- git clone "$srcdir/$_gitname.git" "$srcdir/src/$_gitname"
- cd "$srcdir/src/$_gitname"
- git checkout $_tagname
- GOPATH=$srcdir go build -o $pkgdir/usr/bin/gocode
- }
- package() {
- cd "$srcdir/src/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 -Dm644 emacs/go-autocomplete.el "$pkgdir/usr/share/emacs/site-lisp/go-autocomplete.el"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement