unicorn: package python bindings

This commit is contained in:
Michael Gehring 2016-04-13 20:07:13 +02:00
parent afb8f597b0
commit a9a28b2926
3 changed files with 35 additions and 2 deletions

1
srcpkgs/python-unicorn Symbolic link
View File

@ -0,0 +1 @@
unicorn

1
srcpkgs/python3.4-unicorn Symbolic link
View File

@ -0,0 +1 @@
unicorn

View File

@ -1,9 +1,9 @@
# Template file for 'unicorn'
pkgname=unicorn
version=0.9
revision=1
revision=2
only_for_archs="x86_64 x86_64-musl i686 i686-musl"
hostmakedepends="pkg-config python"
hostmakedepends="pkg-config python-setuptools python3.4-setuptools"
makedepends="glib-devel"
short_desc="Lightweight multi-platform, multi-architecture CPU emulator framework"
maintainer="Michael Gehring <mg@ebfe.org>"
@ -22,10 +22,20 @@ post_extract() {
do_build() {
make
make -C bindings
cd bindings/python
for pyver in 2.7 3.4; do
python${pyver} setup.py build --build-base=build-${pyver}
done
}
do_install() {
make DESTDIR=${PKGDESTDIR} install
cd bindings/python
for pyver in 2.7 3.4; do
python${pyver} setup.py build --build-base=build-${pyver} \
install --prefix=/usr --root=${DESTDIR}
done
}
unicorn-devel_package() {
@ -38,3 +48,24 @@ unicorn-devel_package() {
vmove usr/lib/pkgconfig
}
}
python-unicorn_package() {
depends="${sourcepkg}-devel>=${version}_${revision}"
short_desc+=" - Python2 bindings"
pycompile_version="2.7"
pycompile_module="unicorn"
pkg_install() {
vmove usr/lib/python2.7
}
}
python3.4-unicorn_package() {
depends="${sourcepkg}-devel>=${version}_${revision}"
short_desc+=" - Python3.4 bindings"
pycompile_version="3.4"
pycompile_module="unicorn"
pkg_install() {
vmove usr/lib/python3.4
}
}