void-packages/srcpkgs/unicorn/template
2016-02-18 06:54:29 +01:00

40 lines
1 KiB
Bash

# Template file for 'unicorn'
pkgname=unicorn
version=0.9
revision=1
only_for_archs="x86_64 x86_64-musl i686 i686-musl"
hostmakedepends="pkg-config python"
makedepends="glib-devel"
short_desc="Lightweight multi-platform, multi-architecture CPU emulator framework"
maintainer="Michael Gehring <mg@ebfe.org>"
license="GPL-2"
homepage="http://www.unicorn-engine.org/"
distfiles="https://github.com/unicorn-engine/unicorn/archive/${version}.tar.gz"
checksum=1ca03b1c8f6360335567b528210713461e839d47c4eb7c676ba3aa4f72b8cf10
post_extract() {
# don't build the samples
echo "clean:" > samples/Makefile
# fix unicorn.pc paths
sed 's,libdir=$(LIBDIR),libdir=$(PREFIX)/${LIBDIRARCH},g' -i Makefile
sed 's,includedir=$(INCDIR),includedir=$(PREFIX)/include,g' -i Makefile
}
do_build() {
make
}
do_install() {
make DESTDIR=${PKGDESTDIR} install
}
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
}
}