updated on Wed Jan 25 20:08:56 UTC 2012
[aur-mirror.git] / libdojson-hg / PKGBUILD
blobf0c4f31f9e65fd5b54c110f0c523080a56f3a378
1 # Maintainer: Eduardo Sánchez Muñoz <eduardosanchezmunoz@gmail.com>
3 pkgname=libdojson-hg
4 pkgver=1
5 pkgrel=1
6 pkgdesc="A C library to parse and write JSON files."
7 arch=('i686' 'x86_64')
8 url="http://code.google.com/p/libdojson/"
9 license=('LGPL')
10 depends=('libreaddata-hg' 'libbytechain-hg')
11 makedepends=('gcc' 'mercurial' 'cmake' 're2c' 'libreaddata-hg' 'libbytechain-hg')
12 options=()
13 conflicts=('libdojson')
14 provides=('libdojson')
15 source=()
16 md5sums=()
18 _hgroot="https://code.google.com/p"
19 _hgrepo="libdojson"
21 build() {
22         cd "$srcdir"
23         
24         msg "Connecting to Mercurial server...."
25         
26         if [ -d "$_hgrepo" ] ; then
27                 cd "$_hgrepo"
28                 hg pull -u
29                 msg "The local files are updated."
30         else
31                 hg clone "$_hgroot/$_hgrepo" "$_hgrepo"
32         fi
33         
34         msg "Mercurial checkout done or server timeout"
35         msg "Starting make..."
36         
37         rm -rf "$srcdir/$_hgrepo-build"
38         mkdir -p "$srcdir/$_hgrepo-build"
39         cd "$srcdir/$_hgrepo-build"
40         
41         cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr "$srcdir/$_hgrepo/libdojson"
42         make
45 package() {
46         cd "$srcdir/$_hgrepo-build"
47         make DESTDIR="$pkgdir" install