updated on Sat Jan 14 16:01:55 UTC 2012
[aur-mirror.git] / goweb-git / PKGBUILD
blob1affd6cb5944676a732948f3c79c400cd2a2c095
1 # See http://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines
2 # for more information on packaging from GIT sources.
4 # Maintainer: Sergey Verhovyh <weerse@gmail.com>
5 pkgname=goweb-git
6 pkgver=20110828
7 pkgrel=1
8 pkgdesc="web.go is the simplest way to write web applications in the Go programming language"
9 arch=(i686 x86_64)
10 url="https://github.com/hoisie/web.go"
11 license=('MIT')
12 groups=()
13 depends=('go>=1:r59')
14 makedepends=('git')
15 provides=()
16 conflicts=()
17 replaces=()
18 backup=()
19 options=(!strip)
20 install=
21 source=()
22 noextract=()
23 md5sums=()
25 _gitroot=https://github.com/hoisie/web.go.git
26 _gitname=web.go
28 build() {
29   cd "$srcdir"
30   msg "Connecting to GIT server...."
32   if [[ -d "$_gitname" ]]; then
33     cd "$_gitname" && git pull origin
34     msg "The local files are updated."
35   else
36     git clone "$_gitroot" "$_gitname"
37   fi
39   msg "GIT checkout done or server timeout"
40   msg "Starting build..."
42   rm -rf "$srcdir/$_gitname-build"
43   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
44   cd "$srcdir/$_gitname-build"
46   make
49 package() {
50   cd "$srcdir/$_gitname-build"
51   if [ $CARCH = x86_64 ]; then
52      go_arch=linux_amd64
53   elif [ $CARCH = i686 ]; then
54      go_arch=linux_386
55   else
56     msg "Unknown architecture $CARCH"
57     return 1
58   fi
59   make TARGDIR="$pkgdir"/usr/lib/go/pkg/$go_arch  install
62 # vim:set ts=2 sw=2 et: