66 lines
1.6 KiB
Bash
66 lines
1.6 KiB
Bash
# Template file for 'unicorn'
|
|
pkgname=unicorn
|
|
version=1.0.1
|
|
revision=2
|
|
archs="x86_64* i686*"
|
|
hostmakedepends="python-devel python3-devel python-setuptools python3-setuptools"
|
|
short_desc="Lightweight multi-platform, multi-architecture CPU emulator framework"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="GPL-2"
|
|
homepage="http://www.unicorn-engine.org/"
|
|
distfiles="https://github.com/unicorn-engine/unicorn/archive/${version}.tar.gz"
|
|
checksum=3a6a4f2b8c405ab009040ca43af8e4aa10ebe44d9c8b336aa36dc35df955017c
|
|
|
|
post_extract() {
|
|
# don't build the samples
|
|
echo "clean:" > samples/Makefile
|
|
}
|
|
|
|
do_build() {
|
|
make
|
|
make -C bindings
|
|
cd bindings/python
|
|
for pyver in $py2_ver $py3_ver; do
|
|
python${pyver} setup.py build --build-base=build-${pyver}
|
|
done
|
|
}
|
|
|
|
do_install() {
|
|
make DESTDIR=${DESTDIR} install
|
|
cd bindings/python
|
|
for pyver in $py2_ver $py3_ver; do
|
|
python${pyver} setup.py build --build-base=build-${pyver} \
|
|
install --prefix=/usr --root=${DESTDIR}
|
|
done
|
|
}
|
|
|
|
unicorn-devel_package() {
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/*.a
|
|
vmove usr/lib/*.so
|
|
vmove usr/lib/pkgconfig
|
|
}
|
|
}
|
|
|
|
unicorn-python_package() {
|
|
replaces="python-unicorn>=0"
|
|
depends="${sourcepkg}-devel>=${version}_${revision} python-setuptools"
|
|
short_desc+=" - Python2 bindings"
|
|
pycompile_module="unicorn"
|
|
pkg_install() {
|
|
vmove ${py2_sitelib}
|
|
}
|
|
}
|
|
|
|
unicorn-python3_package() {
|
|
depends="${sourcepkg}-devel>=${version}_${revision} python3-setuptools"
|
|
short_desc+=" - Python3 bindings"
|
|
pycompile_module="unicorn"
|
|
pkg_install() {
|
|
vmove ${py3_sitelib}
|
|
}
|
|
}
|