commit 8653ce35e7524b2273478a6b9ea2de35723d99a7 Author: Lennard Hofmann Date: Mon Feb 19 17:37:59 2024 +0100 Initial commit diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..01c6bee0bfc3 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = radius2-git + pkgdesc = fast binary emulation and symbolic execution framework using radare2 + pkgver = v1.0.16.r30.gbf92f44 + pkgrel = 1 + url = https://github.com/aemmitt-ns/radius + arch = x86_64 + license = MIT + makedepends = cargo + makedepends = git + depends = boolector + depends = gcc-libs + provides = radius2 + conflicts = radius2 + source = git+https://github.com/aemmitt-ns/radius + source = Cargo.toml.patch + sha256sums = SKIP + sha256sums = 5d10a10a3a75927e0d728eaa0120aceab9c4f7258d46268ecb07acc5b111fc16 + +pkgname = radius2-git diff --git a/Cargo.toml.patch b/Cargo.toml.patch new file mode 100644 index 000000000000..a9064c9c9171 --- /dev/null +++ b/Cargo.toml.patch @@ -0,0 +1,11 @@ +--- radius/Cargo.toml ++++ radius/Cargo.toml +@@ -18,8 +18,5 @@ + rand = "0.8.4" + colored = "2.0.0" + +-[features] +-default = ["boolector/vendor-lgl"] +- + [package.metadata.docs.rs] + no-default-features = true diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..9ad19842261f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: Lennard Hofmann +pkgname=radius2-git +_reponame=radius +pkgver=v1.0.16.r30.gbf92f44 +pkgrel=1 +pkgdesc='fast binary emulation and symbolic execution framework using radare2' +arch=('x86_64') +url="https://github.com/aemmitt-ns/$_reponame" +license=('MIT') +depends=('boolector' 'gcc-libs') +makedepends=('cargo' 'git') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +source=("git+$url" Cargo.toml.patch) +sha256sums=('SKIP' + '5d10a10a3a75927e0d728eaa0120aceab9c4f7258d46268ecb07acc5b111fc16') + +pkgver() { + cd "$srcdir/$_reponame" + git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "$srcdir/$_reponame" + + # For some reason, --no-default-features does not work, + # we need to patch the feature out so that cargo does not attempt + # to build lingeling for boolector + patch -p0 < "$srcdir"/Cargo.toml.patch + + export RUSTUP_TOOLCHAIN=stable + cargo fetch --target "$(rustc -vV | sed -n 's/host: //p')" +} + +build() { + cd "$srcdir/$_reponame" + export RUSTUP_TOOLCHAIN=stable + export CARGO_TARGET_DIR=target + cargo build --frozen --release +} + +package() { + cd "$srcdir/$_reponame" + install -Dm755 -t "$pkgdir/usr/bin/" "target/release/radius2" + install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE + install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md +}