summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 60ec47be011cadf2feef975b3d2a89e34dfbdaf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Maintainer: bartus @{aur \at bartus \dot  33mail \dot com}
pkgname=('radare2-bindings-git' 'radare2-pipe-git')
basename='radare2-bindings-git'
pkgver=4.0.0.r0.ge258a53
pkgrel=1
pkgdesc="Language bindings for radare2 (git version)"
arch=('i686' 'x86_64')
url="https://radare.org"
license=('LGPL')
depends=("radare2>=${pkgver%.r*}" 'python3' 'python2')
makedepends=('git' 'valabind' 'swig')

source=("${pkgname}::git://github.com/radare/radare2-bindings.git"
        "radare2-pipe-git::git+https://github.com/radare/radare2-r2pipe.git"
        "plugin.path.patch"
        )
md5sums=('SKIP'
         'SKIP'
         '6274d65a2455632c6083697602039679')


pkgver() {
  cd "$pkgname"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd ${srcdir}/${basename}
  git apply ${srcdir}/plugin.path.patch
}

build() {
  cd "${srcdir}/${basename}"

  ./configure \
      --prefix="/usr" \
      --enable="python"

  export PYTHON_CONFIG=python3.2-config
  export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib/vala-$(vala --version|sed 's:Vala \(.*\..*\)\..*:\1:g')/"
  make

  #(cd r2pipe/python && python setup.py build)
}

package_radare2-pipe-git() {
  provides=('radare2-pipe')

  cd "${srcdir}/radare2-pipe-git/python"
  python2 setup.py install --root "${pkgdir}"
}

package_radare2-bindings-git() {
  provides=('radare2-bindings')

  cd "${srcdir}/${basename}"
  export PYTHON_CONFIG=python3.2-config
  make DESTDIR="${pkgdir}" install
}
# vim:set ts=2 sw=2 et: