updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / go-hg / PKGBUILD
blob7243631de285fc207c3098dbf93fed7324ffa033
1 # Maintainer: Alexander Rødseth <rodseth@gmail.com>
2 # Contributor: Christian Himpel <chressie gmail>
3 # Contributor: Andres Perera <andres87p gmail>
4 # Contributor: Ashok Gautham <ScriptDevil gmail>
5 # Contributor: Matthew Bauer <mjbauer95 gmail>
6 # Contributor: Vesa Kaihlavirta <vegai iki fi>
7 pkgname=go-hg
8 pkgver=8551
9 pkgrel=1
10 pkgdesc='Google Go compiler and tools (hg tip)'
11 arch=('x86_64' 'i686')
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'
21                                 'goinst')
22 md5sums=('a71308b0959ddc712467db60c7ca1df5'
23          '304436b6ab490f98f0028c5ed4b82bbf')
24 _hgroot=https://go.googlecode.com/hg/
25 _hgrepo=go
27 build() {
28   cd "$srcdir/$_hgrepo/src"
30         msg2 "Compiling..."
31   unset GOARCH GOBIN GOOS GOROOT
32   LC_ALL=C GOROOT_FINAL=/opt/go ./make.bash
35 package() {
36   cd "$srcdir/$_hgrepo"
38         msg2 "Packaging files..."
39   mkdir -p $pkgdir/opt/go
40   find * -type f ! -executable -print0 | xargs -0 -I {} install -Dm644 {} $pkgdir/opt/go/{}
41   find * -type f -executable -print0 | xargs -0 -I {} install -Dm755 {} $pkgdir/opt/go/{}
42   install -Dm755 $srcdir/go.sh $pkgdir/etc/profile.d/go.sh
43   install -Dm755 $srcdir/goinst $pkgdir/opt/go/bin/goinst
45   msg2 "Adjusting permissions..."
46   chmod -R g+w $pkgdir/opt/go
47   find $pkgdir/opt/go -type d -print0 | xargs -0 chmod g+s
49   msg2 "Packaging editor-related files..."
50   install -Dm644 misc/bash/go $pkgdir/etc/bash_completion.d/go
51   install -Dm644 misc/emacs/go-mode-load.el $pkgdir/usr/share/emacs/site-lisp/go-mode-load.el
52   install -Dm644 misc/emacs/go-mode.el $pkgdir/usr/share/emacs/site-lisp/go-mode.el
53   install -Dm644 misc/vim/syntax/go.vim $pkgdir/usr/share/vim/vimfiles/syntax/go.vim
54   install -Dm644 misc/vim/ftdetect/gofiletype.vim $pkgdir/usr/share/vim/vimfiles/ftdetect/go.vim
55   install -Dm644 misc/vim/ftplugin/go/import.vim $pkgdir/usr/share/vim/vimfiles/ftplugin/go/import.vim
57   msg2 "Packaging license..."
58   install -Dm644 LICENSE $pkgdir/usr/share/licenses/go/LICENSE
61 # vim:set ts=2 sw=2 et: