updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / librabbitmq-c / PKGBUILD
blob0d4e55870016cb5523e74b76c4c23d9bbddffaed
1 # Contributor: aleiphoenix <aleiphoenix@gmail.com>
3 pkgname=librabbitmq-c
4 pkgver=1.6.0
5 pkgrel=1
6 pkgdesc="A RabbitMQ(amqp) library written in C-language"
7 arch=('i686' 'x86_64')
8 license=('BSD')
9 makedepends=('mercurial' 'autoconf')
10 url="http://hg.rabbitmq.com/rabbitmq-c"
11 options=(!libtool)
13 _hgroot="http://hg.rabbitmq.com/rabbitmq-c"
14 _hgname="rabbitmq-c"
16 _hgcodegen="http://hg.rabbitmq.com/rabbitmq-codegen"
17 _hgcodegenname="codegen"
19 build() {
20   cd $srcdir
21   msg "Connecting to the mercurial server...."
22   
23   if [[ -d $srcdir/$_hgname ]] ; then
24     cd $_hgname
25     hg pull && hg up
26     msg "The local files are updated."
27   else
28     hg clone $_hgroot $_ghname
29     cd $_hgname
30   fi
32   if [[ -d $srcdir/$_hgname/$_hgcodegenname ]] ; then
33     cd $_hgcodegenname
34     hg pull && hg up
35     msg "The local files are updated."
36     cd ..
37   else
38     hg clone $_hgcodegen $_hgcodegenname
39   fi
41   msg "mercurial checkout done"
42   msg "Starting make..."
44   autoreconf -i
45   # make sure we using the python2
46   sed -i 's/checkPython\ python$/checkPython\ python2/g' configure
49   ./configure
50   make
51   make DESTDIR=$pkgdir install
52   
53   rm -rf $srcdir/$_gitname-build