capstone: Add python bindings (#8795)

This commit is contained in:
maxice8 2017-11-02 06:36:11 -02:00 committed by Juan RP
parent e8d30beab8
commit ee88814e28
3 changed files with 26 additions and 1 deletions

1
srcpkgs/capstone-python Symbolic link
View file

@ -0,0 +1 @@
capstone

1
srcpkgs/capstone-python3 Symbolic link
View file

@ -0,0 +1 @@
capstone

View file

@ -1,7 +1,8 @@
# Template file for 'capstone'
pkgname=capstone
version=3.0.4
revision=2
revision=3
hostmakedepends="python-setuptools python3-setuptools"
short_desc="Lightweight multi-platform, multi-architecture disassembly framework"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="2-clause-BSD"
@ -14,6 +15,8 @@ do_build() {
}
do_install() {
make PREFIX=/usr DESTDIR=${DESTDIR} install
make -C bindings/python PREFIX=/usr DESTDIR=${DESTDIR} install
make -C bindings/python PREFIX=/usr DESTDIR=${DESTDIR} install3
vlicense LICENSE.TXT LICENSE
}
@ -27,3 +30,23 @@ capstone-devel_package() {
vmove usr/lib/pkgconfig
}
}
capstone-python_package() {
short_desc+=" - Python2 bindings"
pycompile_module="capstone"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/lib/python2*
vlicense bindings/python/LICENSE.TXT
}
}
capstone-python3_package() {
short_desc+=" - Python3 bindings"
pycompile_module="capstone"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/lib/python3*
vlicense bindings/python/LICENSE.TXT
}
}