updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / go-release-hg / PKGBUILD
blobcbbf7429b61873c76d4858b2fbb316f732a17cdb
1 # Maintainer: Christian Himpel <chressie gmail>
2 # Contributor: Andres Perera <andres87p gmail>
3 # Contributor: Ashok Gautham <ScriptDevil gmail>
4 # Contributor: Matthew Bauer <mjbauer95 gmail>
5 # Contributor: Vesa Kaihlavirta <vegai iki fi>
7 pkgname=go-release-hg
8 pkgver=8038
9 pkgrel=1
10 pkgdesc='Google Go compiler and tools (hg release)'
11 arch=(i686 x86_64)
12 url=http://golang.org/
13 license=(custom)
14 depends=()
15 makedepends=(ed mercurial)
16 provides=(go)
17 conflicts=(go)
18 options=(!strip !makeflags)
19 install=go.install
20 source=(go.sh goinst)
22 _hgroot=https://go.googlecode.com/hg/
23 _hgrepo=go
25 build() {
26   unset GOARCH GOBIN GOOS GOROOT
27   cd $srcdir/$_hgrepo/src
28   hg update release
29   LC_ALL=C GOROOT_FINAL=/opt/go ./make.bash
32 package() {
33   cd $srcdir/$_hgrepo
35   # install all files
36   mkdir -p $pkgdir/opt/go
37   find * -type f ! -executable -print0 | xargs -0 -I {} install -Dm644 {} $pkgdir/opt/go/{}
38   find * -type f -executable -print0 | xargs -0 -I {} install -Dm755 {} $pkgdir/opt/go/{}
40   # adjust permissions
41   chmod -R g+w $pkgdir/opt/go
42   find $pkgdir/opt/go -type d -print0 | xargs -0 chmod g+s
44   install -Dm644 LICENSE $pkgdir/usr/share/licenses/go/LICENSE
45   install -Dm644 misc/bash/go $pkgdir/etc/bash_completion.d/go
46   install -Dm644 misc/emacs/go-mode-load.el $pkgdir/usr/share/emacs/site-lisp/go-mode-load.el
47   install -Dm644 misc/emacs/go-mode.el $pkgdir/usr/share/emacs/site-lisp/go-mode.el
48   install -Dm644 misc/vim/syntax/go.vim $pkgdir/usr/share/vim/vimfiles/syntax/go.vim
49   install -Dm644 misc/vim/ftdetect/gofiletype.vim $pkgdir/usr/share/vim/vimfiles/ftdetect/go.vim
50   install -Dm644 misc/vim/ftplugin/go/import.vim $pkgdir/usr/share/vim/vimfiles/ftplugin/go/import.vim
52   install -Dm755 $srcdir/go.sh $pkgdir/etc/profile.d/go.sh
53   install -Dm755 $srcdir/goinst $pkgdir/opt/go/bin/goinst
55 md5sums=('a71308b0959ddc712467db60c7ca1df5'
56          '304436b6ab490f98f0028c5ed4b82bbf')