updated on Sat Jan 21 08:01:15 UTC 2012
[aur-mirror.git] / radare2-hg / PKGBUILD
blob1c20427f979b781d18038cc93999d2364ff84bfc
1 pkgname="radare2-hg"
2 pkgver=1978
3 pkgrel=1
4 pkgdesc="A collection of tools with the aim to create a complete, portable, multi-architecture, unix-like toolchain for reverse engineering."
5 arch=('i686' 'x86_64')
6 url="http://radare.org"
7 license=('GPL3')
8 depends=('vala' 'valabind-hg')
9 makedepends=('mercurial')
10 provides=('radare2' 'r2-bindings')
11 conflicts=('radare2' 'r2-bindings')
13 _hgroot="http://radare.org/hg"
14 _hgrepo="radare2"
16 build() {
17 cd ${srcdir}
19 if [ -x ${_hgrepo}-build ] ; then
20 msg "Removing leftovers..."
21 rm -rf ${_hgrepo}-build
23 hg clone ${_hgrepo} ${_hgrepo}-build
24 cd ${_hgrepo}-build
26 msg "Building radare2..."
27 ./configure --prefix=/usr
28 export LDFLAGS="${LDFLAGS//-Wl,--as-needed}"
29 make
31 msg "Building language bindings..."
32 cd r2-bindings
33 make clean
34 PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${srcdir}/${_hgrepo}-build/pkgcfg" ./configure --prefix=/usr --enable-devel --enable=python
35 make python2
38 package() {
39 cd ${srcdir}/${_hgrepo}-build
41 make DESTDIR=${pkgdir} install
42 install -d "${pkgdir}/usr/share/man/man1"
43 install -m644 man/* "${pkgdir}/usr/share/man/man1"
45 cd r2-bindings
46 make DESTDIR=${pkgdir} install-vapi
47 make DESTDIR=${pkgdir} PYTHON=python2.7 install-python
49 cd ${srcdir}
50 rm -rf ${_hgrepo}-build