diff options
author | João Figueiredo | 2023-05-14 22:12:31 +0100 |
---|---|---|
committer | João Figueiredo | 2023-05-14 22:12:31 +0100 |
commit | f27f5b2c57b8d3a70a0dba0d42b2b5741771dd65 (patch) | |
tree | 2c6d091dafe40bb211492ea150f5dc0112232ae1 | |
parent | 36db47f5d5bff13270edfc6d430e6107cbf39068 (diff) | |
download | aur-distorm-git.tar.gz |
Merged with official ABS distorm PKGBUILD
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | PKGBUILD | 72 |
2 files changed, 33 insertions, 65 deletions
@@ -1,33 +1,23 @@ -# 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 + pkgver = 3.5.2b_r321.g7a02caa pkgrel = 1 url = https://github.com/gdabah/distorm - arch = i686 arch = x86_64 license = BSD + makedepends = git makedepends = python - makedepends = python2 + makedepends = python-setuptools makedepends = glibc - makedepends = git + provides = distorm + conflicts = distorm options = staticlibs - source = distorm-git::git+https://github.com/gdabah/distorm - sha512sums = SKIP + source = git+https://github.com/gdabah/distorm.git + sha256sums = SKIP pkgname = distorm-git depends = glibc - provides = distorm - conflicts = distorm + provides = libdistorm3.so pkgname = python-distorm-git depends = python - provides = python-distorm - conflicts = python-distorm - -pkgname = python2-distorm-git - depends = python2 - provides = python2-distorm - conflicts = python2-distorm - @@ -1,71 +1,49 @@ -# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> +# Merged with official ABS distorm PKGBUILD by João, 2023/05/14 (all respective contributors apply herein) +# Maintainer: João Figueiredo <islandc0der@chaotic.cx> +# Contributor: 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 +pkgname=(distorm-git python-distorm-git) +pkgver=3.5.2b_r321.g7a02caa 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') +arch=($CARCH) +license=(BSD) +makedepends=(git python python-setuptools glibc) +conflicts=(${pkgname%-git}) +provides=(${pkgname%-git}) +options=(staticlibs) +source=("git+https://github.com/gdabah/${pkgbase%-git}.git") +sha256sums=('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 + cd ${pkgbase%-git} + _ver="$(git describe --tags | sed 's/^v//;s/-.*//')" + echo "${_ver}_r$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)" } build() { - (cd ${pkgbase} - make -C make/linux - python setup.py build - ) - (cd ${pkgbase}-py2 - python2 setup.py build - ) + cd ${pkgbase%-git} + make -C make/linux CFLAGS="${CFLAGS} ${CPPFLAGS} -fPIC" + python setup.py build } package_distorm-git() { depends=('glibc') - provides=('distorm') - conflicts=('distorm') - cd ${pkgbase} + provides=('libdistorm3.so') + cd ${pkgbase%-git} 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" + install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname%-git}" + ln -sf "/usr/lib/libdistorm3.so.$(grep 'LIB_R_VERSION =' make/linux/Makefile|cut -d' ' -f3)" "${pkgdir}/usr/lib/libdistorm3.so" } package_python-distorm-git() { depends=('python') - provides=('python-distorm') - conflicts=('python-distorm') - cd ${pkgbase} + cd ${pkgbase%-git} 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" + install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname%-git}" } - -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: |