From ee88814e28972f0435d81c8fa23d03e0370604d7 Mon Sep 17 00:00:00 2001 From: maxice8 <30738253+maxice8@users.noreply.github.com> Date: Thu, 2 Nov 2017 06:36:11 -0200 Subject: [PATCH] capstone: Add python bindings (#8795) --- srcpkgs/capstone-python | 1 + srcpkgs/capstone-python3 | 1 + srcpkgs/capstone/template | 25 ++++++++++++++++++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 120000 srcpkgs/capstone-python create mode 120000 srcpkgs/capstone-python3 diff --git a/srcpkgs/capstone-python b/srcpkgs/capstone-python new file mode 120000 index 0000000000..d9b9ebd615 --- /dev/null +++ b/srcpkgs/capstone-python @@ -0,0 +1 @@ +capstone \ No newline at end of file diff --git a/srcpkgs/capstone-python3 b/srcpkgs/capstone-python3 new file mode 120000 index 0000000000..d9b9ebd615 --- /dev/null +++ b/srcpkgs/capstone-python3 @@ -0,0 +1 @@ +capstone \ No newline at end of file diff --git a/srcpkgs/capstone/template b/srcpkgs/capstone/template index bebbcfd496..dd019e9d82 100644 --- a/srcpkgs/capstone/template +++ b/srcpkgs/capstone/template @@ -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 " 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 + } +}