PKGBUILDs/community/afl/PKGBUILD
2019-08-12 12:52:46 +00:00

41 lines
1.5 KiB
Bash

# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: spider-mario <spidermario@free.fr>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - make with AFL_NO_X86=1
# - strip -fno-plt from v5 CFLAGS (old LLVM)
pkgname=afl
pkgver=2.53b
pkgrel=1
pkgdesc='Security-oriented fuzzer using compile-time instrumentation and genetic algorithms'
url='http://lcamtuf.coredump.cx/afl/'
arch=('x86_64')
license=('Apache')
depends=('glibc' 'bash')
optdepends=('gcc: gcc instrumentation support'
'clang: clang instrumentation support'
'llvm: experimental clang-fast instrumentation support'
'gnuplot: graph plotting support')
makedepends=('clang' 'llvm' 'gcc' 'wget' 'python')
provides=('american-fuzzy-lop')
replaces=('american-fuzzy-lop')
options=('!emptydirs' '!strip')
source=(https://github.com/google/AFL/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha256sums=('ea4917c0c982f45866d6fbf129a78eb9959736bd69bb269cab57f2695661e6e6')
sha512sums=('709fba16eda4b0175273ac24e2fcb0fa469d203b666c87a367a3bd76e3acea1f67642b8f492065b5b5b04c0224a47aa121e7b056a1b39de8cf8979f9367cd051')
build() {
cd AFL-${pkgver}
[[ $CARCH == "arm" ]] && CFLAGS=`echo $CFLAGS | sed -e 's/-fno-plt//'` && CXXFLAGS="$CFLAGS"
make PREFIX=/usr AFL_NO_X86=1
make -C llvm_mode PREFIX=/usr
}
package() {
cd AFL-${pkgver}
make PREFIX=/usr AFL_NO_X86=1 DESTDIR="${pkgdir}" install
install -Dm 644 llvm_mode/README.llvm -t "${pkgdir}/usr/share/doc/${pkgname}"
}
# vim: ts=2 sw=2 et: