void-packages/srcpkgs/afl/template
Jürgen Buchmüller a7c44bcb7d afl: fix build
2020-11-10 06:07:42 +01:00

34 lines
939 B
Bash

# Template file for 'afl'
pkgname=afl
version=2.57b
revision=1
# x86 only currently
archs="i686* x86_64*"
wrksrc="AFL-${version}"
build_style=gnu-makefile
hostmakedepends="clang llvm which"
short_desc="American fuzzy lop - a brute-force fuzzer"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="Apache-2.0"
homepage="https://github.com/google/AFL/"
distfiles="https://github.com/google/AFL/archive/v${version}.tar.gz"
checksum=6f05a6515c07abe49f6f292bd13c96004cc1e016bda0c3cc9c2769dd43f163ee
nostrip_files="small_archive.a small_exec.elf"
do_build() {
make PREFIX=/usr
CFLAGS="${CFLAGS//-fstack-clash-protection} -fPIC" \
CXXFLAGS="${CXXFLAGS//-fstack-clash-protection} -fPIC" \
LDFLAGS="${LDFLAGS} -pie" \
make PREFIX=/usr CC=clang CXX=clang++ -C llvm_mode
}
post_install() {
# Test cases contain binary .../testcases/others/elf/small_exec.elf
# so move them to /usr/lib/afl
mv ${DESTDIR}/usr/{share,lib}/afl/testcases
}