mirror of
https://github.com/archlinux/aur.git
synced 2026-01-27 20:28:31 +01:00
Original maintainer aemmitt-ns is inactive, see https://github.com/aemmitt-ns/radius2/issues/27
47 lines
1.3 KiB
Bash
47 lines
1.3 KiB
Bash
# Maintainer: Lennard Hofmann <lennard dot hofmann at web dot de>
|
|
pkgname=radius2-git
|
|
_reponame=radius2
|
|
pkgver=r170.15e1b79
|
|
pkgrel=1
|
|
pkgdesc='fast binary emulation and symbolic execution framework using radare2'
|
|
arch=('x86_64')
|
|
url="https://github.com/radareorg/$_reponame"
|
|
license=('MIT')
|
|
depends=('boolector' 'radare2' 'gcc-libs' 'glibc')
|
|
makedepends=('cargo' 'git')
|
|
provides=("${pkgname%-git}")
|
|
conflicts=("${pkgname%-git}")
|
|
source=("git+$url" Cargo.toml.patch)
|
|
sha256sums=('SKIP'
|
|
'5d10a10a3a75927e0d728eaa0120aceab9c4f7258d46268ecb07acc5b111fc16')
|
|
|
|
pkgver() {
|
|
cd "$srcdir/$_reponame"
|
|
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
|
}
|
|
|
|
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
|
|
}
|