summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Bouvier2021-08-04 08:44:13 +0200
committerAlexandre Bouvier2021-08-04 08:44:13 +0200
commitafb21318d2bba1a458a10dc955720d707f67419e (patch)
tree6d90a2b413a95bb29e899a3c846b88fc9b20e2df
downloadaur-afb21318d2bba1a458a10dc955720d707f67419e.tar.gz
update to 3.1.0.r75.g6a17c48
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD53
2 files changed, 72 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4f5508ff9cc4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = zydis-git
+ pkgdesc = Fast and lightweight x86/x86-64 disassembler library
+ pkgver = 3.1.0.r75.g6a17c48
+ pkgrel = 1
+ url = https://zydis.re/
+ arch = x86_64
+ license = MIT
+ makedepends = cmake
+ makedepends = git
+ depends = glibc
+ provides = zydis=3.1.0.r75.g6a17c48
+ provides = libZydis.so
+ conflicts = zydis
+ source = git+https://github.com/zyantific/zydis.git
+ source = git+https://github.com/zyantific/zycore-c.git
+ b2sums = SKIP
+ b2sums = SKIP
+
+pkgname = zydis-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..4bd5a498d2ed
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: Alexandre Bouvier <contact@amb.tf>
+_pkgname=zydis
+pkgname=$_pkgname-git
+pkgver=3.1.0.r75.g6a17c48
+pkgrel=1
+pkgdesc='Fast and lightweight x86/x86-64 disassembler library'
+arch=('x86_64')
+url='https://zydis.re/'
+license=('MIT')
+depends=('glibc')
+makedepends=('cmake' 'git')
+provides=("$_pkgname=$pkgver" 'libZydis.so')
+conflicts=("$_pkgname")
+source=(
+ "git+https://github.com/zyantific/$_pkgname.git"
+ 'git+https://github.com/zyantific/zycore-c.git'
+)
+b2sums=(
+ 'SKIP'
+ 'SKIP'
+)
+
+pkgver() {
+ cd $_pkgname
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd $_pkgname
+ git submodule init dependencies/zycore
+ git config submodule.dependencies/zycore.url ../zycore-c
+ git submodule update
+}
+
+build() {
+ cmake -S $_pkgname -B build \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DZYDIS_BUILD_SHARED_LIB=ON \
+ -DZYDIS_FEATURE_AVX512=OFF \
+ -DZYDIS_FEATURE_KNC=OFF \
+ -Wno-dev
+ cmake --build build
+}
+
+package() {
+ # shellcheck disable=SC2154
+ DESTDIR="$pkgdir" cmake --install build
+ DESTDIR="$pkgdir" cmake --install build/zycore
+ install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname $_pkgname/LICENSE
+ # remove leftover files
+ rm -r "$pkgdir"/usr/{cmake,lib/libZycore.a}
+}