Commit 258e11f6 authored by Nong Hoang Tu's avatar Nong Hoang Tu
Browse files

Add python3 binding

parent 36cc32de
......@@ -2,7 +2,7 @@ Source: keystone-engine
Priority: optional
Maintainer: Nong Hoang Tu <dmknght@parrotsec.org>
XSBC-Original-Maintainer: Michael Mohr <akihana@gmail.com>
Build-Depends: debhelper (>= 9), cmake
Build-Depends: debhelper (>= 9), cmake, dh-python, python3-setuptools, python3-all, python3-distutils
Standards-Version: 4.5.1
Section: libs
Homepage: http://www.keystone-engine.org/
......@@ -30,3 +30,11 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, libkeystone0, parrot-menu
Description: A lightweight multi-architecture assembler framework.
Multi-architecture, with support for Arm, Arm64 (AArch64/Armv8),
Hexagon, Mips, PowerPC, Sparc, SystemZ, & X86 (include 16/32/64bit).
Package: python3-keystone-engine
Architecture: any
Depends: ${python3:Depends}, ${misc:Depends}, libkeystone0
Description: A lightweight multi-architecture assembler framework.
Multi-architecture, with support for Arm, Arm64 (AArch64/Armv8),
Hexagon, Mips, PowerPC, Sparc, SystemZ, & X86 (include 16/32/64bit).
This package is python3-binding for keystone-engine
......@@ -2,26 +2,25 @@
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
export PYBUILD_NAME=keystone_engine
export PYBUILD_SYSTEM=distutils
export PYTHONPATH=
%:
dh $@ --parallel
# dh_make generated override targets
# This is example for Cmake (See https://bugs.debian.org/641051 )
#override_dh_auto_configure:
# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
override_dh_auto_configure:
dh_auto_configure -- -DBUILD_SHARED_LIBS=ON -DLLVM_TARGETS_TO_BUILD="all"
override_dh_auto_install:
dh_auto_install
cd bindings/python && python3 setup.py install --force --root=../../debian/python3-keystone-engine --no-compile -O0 --install-layout=deb
# Try to use normal shared lib instead
rm debian/python3-keystone-engine/usr/lib/python3/dist-packages/keystone/libkeystone.so
# Name conflict with python3-keystone (OpenStack package)
mkdir -p debian/python3-keystone-engine/usr/local/
mv debian/python3-keystone-engine/usr/lib/ debian/python3-keystone-engine/usr/local/
mv debian/python3-keystone-engine/usr/local/lib/python3 debian/python3-keystone-engine/usr/local/lib/python3.9
py3clean .
override_dh_usrlocal:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment