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