summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoranthraxx2017-03-16 15:19:08 +0100
committeranthraxx2017-03-16 15:19:08 +0100
commit2567289fc7f0cec037663522d77e6347b3aa8083 (patch)
tree0959b77f2687a28c6eaf354ec4117f66fa365082
parent61d6409b60c223721b8cd4d4dae5bb4ce0f6ea1e (diff)
downloadaur-2567289fc7f0cec037663522d77e6347b3aa8083.tar.gz
upgpkg: unicorn-git 1.0.1616.15b99f1-1
upstream release
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD59
2 files changed, 79 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2b2abeb69219..446297a0518e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = unicorn-git
pkgdesc = Lightweight, multi-platform, multi-architecture CPU emulator framework based on QEMU
- pkgver = 0.9.645.2722935
+ pkgver = 1.0.1616.15b99f1
pkgrel = 1
url = http://www.unicorn-engine.org
arch = i686
@@ -8,13 +8,36 @@ pkgbase = unicorn-git
license = GPL2
checkdepends = cmocka
makedepends = git
- makedepends = pkg-config
+ makedepends = python
makedepends = python2
- depends = glib2
+ makedepends = python-setuptools
+ makedepends = python2-setuptools
+ makedepends = ruby
+ options = staticlibs
+ options = !emptydirs
source = unicorn-git::git+https://github.com/unicorn-engine/unicorn
sha512sums = SKIP
pkgname = unicorn-git
+ depends = glibc
provides = unicorn
conflicts = unicorn
+pkgname = python-unicorn-git
+ depends = python
+ depends = unicorn
+ provides = python-unicorn
+ conflicts = python-unicorn
+
+pkgname = python2-unicorn-git
+ depends = python2
+ depends = unicorn
+ provides = python2-unicorn
+ conflicts = python2-unicorn
+
+pkgname = ruby-unicorn-git
+ depends = ruby
+ depends = unicorn
+ provides = ruby-unicorn
+ conflicts = ruby-unicorn
+
diff --git a/PKGBUILD b/PKGBUILD
index bdfc508b546d..a9db6c4b97d3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,16 +1,16 @@
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
pkgbase=unicorn-git
-pkgname=('unicorn-git')
-pkgver=0.9.645.2722935
+pkgname=('unicorn-git' 'python-unicorn-git' 'python2-unicorn-git' 'ruby-unicorn-git')
+pkgver=1.0.1616.15b99f1
pkgrel=1
pkgdesc='Lightweight, multi-platform, multi-architecture CPU emulator framework based on QEMU'
url='http://www.unicorn-engine.org'
arch=('i686' 'x86_64')
license=('GPL2')
-depends=('glib2')
-makedepends=('git' 'pkg-config' 'python2')
+makedepends=('git' 'python' 'python2' 'python-setuptools' 'python2-setuptools' 'ruby')
checkdepends=('cmocka')
+options=('staticlibs' '!emptydirs')
source=(${pkgbase}::git+https://github.com/unicorn-engine/unicorn)
sha512sums=('SKIP')
@@ -25,25 +25,72 @@ prepare() {
sed 's|-O3|-O2|g' -i Makefile qemu/configure
sed 's|-g ||g' -i qemu/configure
sed 's|UNICORN_DEBUG ?= yes|UNICORN_DEBUG ?= no|g' -i config.mk
+ cp -ra bindings/python{,2}
+ sed -r 's|(python)$|\12|' -i bindings/python2/*.py
}
build() {
cd ${pkgbase}
make UNICORN_QEMU_FLAGS="--python=/usr/bin/python2"
+ (cd bindings
+ python const_generator.py python
+ python const_generator.py ruby
+ )
+ (cd bindings/python
+ python setup.py build
+ )
+ (cd bindings/python2
+ python2 setup.py build
+ )
+ (cd bindings/ruby/unicorn_gem
+ gem build unicorn.gemspec
+ )
}
check() {
cd ${pkgbase}
- make test
+ # Tests are not supported right now, hope they get some love soon
+ # make test
}
package_unicorn-git() {
+ depends=('glibc')
provides=('unicorn')
conflicts=('unicorn')
-
cd ${pkgbase}
make DESTDIR="${pkgdir}" install
install -Dm 644 samples/*.c -t "${pkgdir}/usr/share/doc/${pkgname}/samples"
}
+package_python-unicorn-git() {
+ depends=('python' 'unicorn')
+ provides=('python-unicorn')
+ conflicts=('python-unicorn')
+ cd ${pkgbase}/bindings/python
+ python setup.py install --root="${pkgdir}" -O1 --skip-build
+ install -Dm 644 sample* shellcode.py -t "${pkgdir}/usr/share/doc/${pkgname}/samples"
+}
+
+package_python2-unicorn-git() {
+ depends=('python2' 'unicorn')
+ provides=('python2-unicorn')
+ conflicts=('python2-unicorn')
+ cd ${pkgbase}/bindings/python2
+ python2 setup.py install --root="${pkgdir}" -O1 --skip-build
+ install -Dm 644 sample* shellcode.py -t "${pkgdir}/usr/share/doc/${pkgname}/samples"
+}
+
+package_ruby-unicorn-git() {
+ depends=('ruby' 'unicorn')
+ provides=('ruby-unicorn')
+ conflicts=('ruby-unicorn')
+ cd ${pkgbase}/bindings/ruby/unicorn_gem
+ local _gemdir="$(gem env gemdir)"
+ gem install --ignore-dependencies --no-user-install -i "${pkgdir}${_gemdir}" \
+ -n "${pkgdir}/usr/bin" unicorn-*.gem -- --with-opt-include="${srcdir}/${pkgbase}/include"
+ rm -r "${pkgdir}/${_gemdir}"/{cache/unicorn-*.gem,build_info}
+ find "${pkgdir}/${_gemdir}" \( -name 'mkmf.log' -or -name 'gem_make.out' \) -delete
+ install -Dm 644 ../sample* -t "${pkgdir}/usr/share/doc/${pkgname}/samples"
+}
+
# vim: ts=2 sw=2 et: