updated on Sun Jan 22 12:09:12 UTC 2012
[aur-mirror.git] / valaswig-hg / PKGBUILD
blob733d8a0140e58626a3c82c04122114cbe3419e94
1 pkgname=valaswig-hg
2 pkgver=106
3 pkgrel=1
4 pkgdesc="A tool to parse vala or vapi files to transform them into swig interface files."
5 arch=('i686' 'x86_64')
6 url="http://hg.youterm.com/valaswig"
7 license=('GPL2')
8 depends=('vala')
9 makedepends=('mercurial')
10 provides=("valaswig")
11 conflicts=('valaswig')
13 _hgroot="http://hg.youterm.com"
14 _hgrepo="valaswig"
16 build() {
17   cd ${srcdir}
18   msg "Connecting to Mercurial server...."
20   if [ -d ${_hgrepo} ] ; then
21     cd ${_hgrepo}
22     hg pull -u
23     msg "The local files are updated."
24   else
25     hg clone ${_hgroot} ${_hgrepo}
26   fi
28   msg "Mercurial checkout done or server timeout"
29   msg "Starting make..."
31   rm -rf ${srcdir}/${_hgrepo}-build
32   hg clone ${srcdir}/${_hgrepo} ${srcdir}/${_hgrepo}-build
33   cd ${srcdir}/${_hgrepo}-build
36   sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
37          -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
38          $(find ${srcdir}/${_hgrepo}-build -name '*.py')
39         make all|| return 1
42 package() {
43   cd ${srcdir}/${_hgrepo}-build
44   make DESTDIR=${pkgdir} install
45   rm -rf ${srcdir}/${_hgrepo}-build