diff options
author | anthraxx | 2016-06-12 20:52:14 +0200 |
---|---|---|
committer | anthraxx | 2016-06-12 20:52:14 +0200 |
commit | 36db47f5d5bff13270edfc6d430e6107cbf39068 (patch) | |
tree | b6baa04358448a53382a30b0e8d65ebbdcf271a7 | |
download | aur-36db47f5d5bff13270edfc6d430e6107cbf39068.tar.gz |
addpkg: distorm-git 3.3.4.146.1637726-1
-rw-r--r-- | .SRCINFO | 33 | ||||
-rw-r--r-- | PKGBUILD | 71 |
2 files changed, 104 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..07108a711b67 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,33 @@ +# Generated by mksrcinfo v8 +# Sun Jun 12 18:52:14 UTC 2016 +pkgbase = distorm-git + pkgdesc = Powerful disassembler library for x86/AMD64 + pkgver = 3.3.4.146.1637726 + pkgrel = 1 + url = https://github.com/gdabah/distorm + arch = i686 + arch = x86_64 + license = BSD + makedepends = python + makedepends = python2 + makedepends = glibc + makedepends = git + options = staticlibs + source = distorm-git::git+https://github.com/gdabah/distorm + sha512sums = SKIP + +pkgname = distorm-git + depends = glibc + provides = distorm + conflicts = distorm + +pkgname = python-distorm-git + depends = python + provides = python-distorm + conflicts = python-distorm + +pkgname = python2-distorm-git + depends = python2 + provides = python2-distorm + conflicts = python2-distorm + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..9371d284c6ae --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,71 @@ +# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> +# Contributor: Mike Sampson <mike at sambodata dot com> +# Contributor: Dmitry A. Ilyashevich <dmitry.ilyashevich@gmail.com> + +pkgbase=distorm-git +pkgname=('distorm-git' 'python-distorm-git' 'python2-distorm-git') +pkgver=3.3.4.146.1637726 +pkgrel=1 +pkgdesc='Powerful disassembler library for x86/AMD64' +url='https://github.com/gdabah/distorm' +arch=('i686' 'x86_64') +license=('BSD') +makedepends=('python' 'python2' 'glibc' 'git') +options=('staticlibs') +source=(${pkgbase}::git+https://github.com/gdabah/distorm) +sha512sums=('SKIP') + +pkgver() { + cd ${pkgbase} + printf "%s.%s.%s" "$(git describe --tags --abbrev=0|sed -r 's|v?(.+)|\1|')" \ + "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cp -ra ${pkgbase}{,-py2} + sed -e '1i#!/usr/bin/env python' -i ${pkgbase}/python/distorm3/sample.py + sed -e '1i#!/usr/bin/env python2' -i ${pkgbase}-py2/python/distorm3/sample.py +} + +build() { + (cd ${pkgbase} + make -C make/linux + python setup.py build + ) + (cd ${pkgbase}-py2 + python2 setup.py build + ) +} + +package_distorm-git() { + depends=('glibc') + provides=('distorm') + conflicts=('distorm') + cd ${pkgbase} + make -C make/linux PREFIX=/usr DESTDIR="${pkgdir}" install + install -Dm 644 include/*.h -t "${pkgdir}/usr/include" + install -Dm 644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} + +package_python-distorm-git() { + depends=('python') + provides=('python-distorm') + conflicts=('python-distorm') + cd ${pkgbase} + python setup.py install --root="${pkgdir}" -O1 --skip-build + install -Dm 755 python/distorm3/sample.py "${pkgdir}/usr/bin/disasm" + install -Dm 644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} + +package_python2-distorm-git() { + depends=('python2') + provides=('python2-distorm') + conflicts=('python2-distorm') + cd ${pkgbase}-py2 + python2 setup.py install --root="${pkgdir}" -O1 --skip-build + install -Dm 755 python/distorm3/sample.py "${pkgdir}/usr/bin/disasm" + install -Dm 644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + mv "${pkgdir}/usr/bin/disasm"{,-py2} +} + +# vim: ts=2 sw=2 et: |