updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / res2c-hg / PKGBUILD
blob19958f314076e3e60fc5e3469c79e7f63314d4fa
1 # Maintainer: Eduardo Sánchez Muñoz <eduardosanchezmunoz@gmail.com>
3 pkgname=res2c-hg
4 pkgver=0
5 pkgrel=1
6 pkgdesc="A program to convert a file to a C array."
7 arch=('i686' 'x86_64')
8 url="http://code.google.com/p/res2c/"
9 license=('LGPL')
10 depends=()
11 makedepends=('gcc' 'mercurial' 'cmake')
12 options=()
13 conflicts=('res2c')
14 provides=('res2c')
15 source=()
16 md5sums=()
18 _hgroot="https://code.google.com/p"
19 _hgrepo="res2c"
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/res2c"
42         make
45 package() {
46         cd "$srcdir/$_hgrepo-build"
47         make DESTDIR="$pkgdir" install