1 # Contributor: Jens Pranaitis <jens@jenux.homelinux.org>
2 # Contributor: Shino <shino@jenux.homelinux.org>
3 # Contributor: phara0h <jan@das-labor.org>
8 pkgdesc="A collection of tools with the aim to create a complete, portable, multi-architecture, unix-like toolchain for reverse engineering."
10 url="http://radare.org"
12 depends=('bash' 'perl' 'python2' 'vala')
13 makedepends=('mercurial')
14 optdeps=('vte: GUI support')
20 _hgroot="http://hg.youterm.com"
26 if [ -d ${_hgrepo}-build ]; then
27 msg "Removing old build-dir"
28 rm -rf ${_hgrepo}-build
31 hg clone ${_hgrepo} ${_hgrepo}-build
35 sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" ./gui/wscript_build
36 sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" ./src/arch/arm/aasm/wscript_build
37 sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" ./src/javasm/wscript_build
38 sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" ./src/plug/hack/wscript_build
39 sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" ./src/plug/io/wscript_build
40 sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" ./src/rabin/wscript_build
41 sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" ./src/radiff/wscript_build
42 sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" ./src/rahash/wscript_build
43 sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" ./src/rasc/wscript_build
44 sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" ./src/rasm/wscript_build
45 sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" ./src/rsc/wscript_build
46 sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" ./src/wscript_build
47 sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" ./vala/grava/wscript_build
48 sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" ./vala/wscript_build
49 sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" ./wscript
52 ./configure --prefix=/usr
59 cd ${srcdir}/${_hgrepo}-build
62 make DESTDIR=${pkgdir} install
64 install -d "${pkgdir}/usr/share/man/man1"
65 install -m644 man/* "${pkgdir}/usr/share/man/man1"
67 sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
68 -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
69 $(find $pkgdir -name '*.py')
72 rm -rf ${_hgrepo}-build