1 # Contributor: str1ngs <schzoid29 at gmail.com>
4 # if you have problem with this package build please fork it at http://github.com/str1ngs/gobuild-hg
5 # and send me a pull request with any fixes
10 pkgdesc="gobuild is an automatic build tool that aims to replace Makefiles for simple projects written in the Go programming language."
11 arch=('i686' 'x86_64')
12 url="http://code.google.com/p/gobuild/"
16 makedepends=('mercurial' 'go')
24 md5sums=() #generate with 'makepkg -g'
26 _hgroot="https://gobuild.googlecode.com/hg/"
32 unset GOARCH GOROOT GOOS GOBIN
34 #unset -j flags, build breaks on parallel make jobs
37 #source system go enviroment
38 source /etc/profile.d/go.sh || return 1
41 msg "Connecting to Mercurial server...."
43 if [ -d $_hgrepo ] ; then
45 hg pull -u || return 1
46 msg "The local files are updated."
48 hg clone $_hgroot $_hgrepo || return 1
51 msg "Mercurial checkout done or server timeout"
52 msg "Starting make..."
54 rm -rf "$srcdir/$_hgrepo-build"
55 cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
56 cd "$srcdir/$_hgrepo-build"
64 install -D -m644 LICENSE $pkgdir/usr/share/licenses/${pkgname/-hg}/LICENSE || return 1
65 install -D -m755 gobuild $pkgdir/usr/bin/gobuild || return 1