updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / go-hdf5-hg / PKGBUILD
blobbf5924fc70a4d44f513ada4fbc7e5a1a404d9ba1
1 # Maintainer: Rémy Oudompheng <remy@archlinux.org>
3 pkgname=go-hdf5-hg
4 _goname=hdf5
5 pkgver=9
6 pkgrel=1
7 pkgdesc="Go bindings to the HDF5 library"
8 arch=('i686' 'x86_64')
9 url="https://bitbucket.org/binet/go-hdf5"
10 license=('custom')
11 depends=('go' 'hdf5')
12 makedepends=('mercurial' 'godag')
13 provides=('go-hdf5')
14 options=('!strip')
15 source=('Makefile')
16 md5sums=('40fcfbb61d9ae43054d96bc77e159ade')
18 _hgroot="https://bitbucket.org/binet"
19 _hgrepo="go-hdf5"
21 build() {
22   cd "$srcdir"
23   msg "Connecting to Mercurial server...."
25   if [ -d $_hgrepo ] ; then
26     cd $_hgrepo
27     hg pull -u
28     msg "The local files are updated."
29   else
30     hg clone $_hgroot $_hgrepo
31   fi
33   msg "Mercurial checkout done or server timeout"
34   msg "Starting make..."
36   rm -rf "$srcdir/$_hgrepo-build"
37   cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
38   cd "$srcdir/$_hgrepo-build"
40   source /etc/profile.d/go.sh
41   cd pkg/hdf5
42   cp $srcdir/Makefile .
43   gomake
46 package() {
47   cd "$srcdir/$_hgrepo-build"
48   source /etc/profile.d/go.sh
49   mkdir -p ${pkgdir}/${GOROOT}/src/pkg/${_goname}
50   # copy source files
51   cp -Rv ${srcdir}/${_hgrepo}/* ${pkgdir}/${GOROOT}/src/pkg/${_goname}
52   # install libraries
53   cd pkg/hdf5
54   cp -v ${GOROOT}/src/Make.* ${pkgdir}/${GOROOT}/src/
55   GOROOT=${pkgdir}/${GOROOT} gomake install
56   rm -f ${pkgdir}/${GOROOT}/src/Make.*
59 # vim: set ts=2 sw=2 et: