diff options
author | jakob | 2021-01-18 19:52:56 +0100 |
---|---|---|
committer | jakob | 2021-01-18 19:52:56 +0100 |
commit | c31086198c75d0027dbcad5d2693b02d71d8fdca (patch) | |
tree | be3a874640b1e1014267176cbfed97fdfd7502a0 | |
download | aur-c31086198c75d0027dbcad5d2693b02d71d8fdca.tar.gz |
4.0.2
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 36 |
2 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..83f50e07ec01 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = mingw-w64-capstone + pkgdesc = Lightweight multi-platform, multi-architecture disassembly framework (mingw-w64) + pkgver = 4.0.2 + pkgrel = 1 + url = https://www.capstone-engine.org/ + arch = any + license = BSD + depends = mingw-w64-crt + depends = mingw-w64-curl + depends = mingw-w64-libssh2 + depends = mingw-w64-openssl + depends = mingw-w64-zlib + options = staticlibs + options = !buildflags + options = !strip + source = https://github.com/aquynh/capstone/archive/4.0.2.tar.gz + sha256sums = 7c81d798022f81e7507f1a60d6817f63aa76e489aa4e7055255f21a22f5e526a + +pkgname = mingw-w64-capstone + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..10306c03ef9c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: jakob <grandchild@gmx.net> + +_pkgname=capstone +pkgname=mingw-w64-${_pkgname} +pkgver=4.0.2 +pkgrel=1 +pkgdesc="Lightweight multi-platform, multi-architecture disassembly framework (mingw-w64)" +arch=(any) +depends=(mingw-w64-{crt,curl,libssh2,openssl,zlib}) +# makedepends=(mingw-w64-cmake) +options=(staticlibs !buildflags !strip) +license=(BSD) +url="https://www.capstone-engine.org/" +source=("https://github.com/aquynh/${_pkgname}/archive/${pkgver}.tar.gz") +sha256sums=('7c81d798022f81e7507f1a60d6817f63aa76e489aa4e7055255f21a22f5e526a') + +_architectures="i686-w64-mingw32 x86_64-w64-mingw32" + +build() { + cd "${srcdir}/${_pkgname}-${pkgver}" + for _arch in ${_architectures}; do + mkdir -p build-${_arch} && pushd build-${_arch} + ${_arch}-cmake -DTHREADSAFE=ON -DBUILD_CLAR=OFF -DSTDCALL=ON .. + make + popd + done +} + +package() { + for _arch in ${_architectures}; do + cd "${srcdir}/${_pkgname}-${pkgver}/build-${_arch}" + make DESTDIR="${pkgdir}" install + find "$pkgdir/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs ${_arch}-strip -g + done +} |