aboutsummaryrefslogtreecommitdiffstats
path: root/testing/afl/APKBUILD
diff options
context:
space:
mode:
authorMarian Buschsieweke <m.buschsieweke@uni-muenster.de>2016-05-08 20:22:18 +0200
committerFrancesco Colista <fcolista@alpinelinux.org>2016-05-11 09:20:58 +0000
commit8da9004835c2a63293f5cc9b5a40100471d1102d (patch)
tree8dc5d0d7afaf65e323986ec8f34d216424151166 /testing/afl/APKBUILD
parent89e36f67971a9b51c8f365854194b3dc15b9fe0e (diff)
downloadaports-8da9004835c2a63293f5cc9b5a40100471d1102d.tar.bz2
aports-8da9004835c2a63293f5cc9b5a40100471d1102d.tar.xz
testing/afl: new aport
american fuzzy lop is a fuzzer relying on genetic algorithms instead brute force This package installs only the llvm_mode of afl, which is not only faster than the gcc mode, but also portable to non-x86 platforms. This way this package should work on all platforms.
Diffstat (limited to 'testing/afl/APKBUILD')
-rw-r--r--testing/afl/APKBUILD38
1 files changed, 38 insertions, 0 deletions
diff --git a/testing/afl/APKBUILD b/testing/afl/APKBUILD
new file mode 100644
index 0000000000..a7b885e232
--- /dev/null
+++ b/testing/afl/APKBUILD
@@ -0,0 +1,38 @@
+# Contributor: Marian <mari.hahn@wwu.de>
+# Maintainer: Marian <mari.hahn@wwu.de>
+pkgname=afl
+pkgver=2.12b
+pkgrel=0
+pkgdesc="american fuzzy lop is a fuzzer relying on genetic algorithms instead brute force"
+url="http://lcamtuf.coredump.cx/afl/"
+arch="all"
+license="apache_2_0"
+depends="clang clang-libs llvm llvm-libs"
+depends_dev=""
+makedepends="llvm-dev clang-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://lcamtuf.coredump.cx/afl/releases/afl-latest.tgz"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
+
+build() {
+ # using the llvm mode, which is faster and portable
+ cd "$_builddir"
+ make CC=clang BINDIR=/usr/bin AFL_NO_X86=1
+ make CC=clang BINDIR=/usr/bin AFL_NO_X86=1 -C llvm_mode
+}
+
+package() {
+ cd "$_builddir"
+ make AFL_NO_X86=1 BINDIR=/usr/bin PREFIX=/usr DESTDIR="$pkgdir" install
+
+ # Removing non llvm_mode compiler wrappers, which are slower and only
+ # working on x86
+ rm "${pkgdir}/usr/bin/afl-clang" "${pkgdir}/usr/bin/afl-clang++" \
+ "${pkgdir}/usr/bin/afl-gcc" "${pkgdir}/usr/bin/afl-g++"
+}
+
+md5sums="3162bb1662a49c60e3bf814946eda590 afl-latest.tgz"
+sha256sums="7fdc2d7f6ff7ff7ada27b84fec07f7e7910facb468c94db14861c295a9f830ba afl-latest.tgz"
+sha512sums="76e5018cc7ece1e9d164e91ec3552925454b85bf9d981fc2eb6a718fdb06741796b323605ddba93d01df0d9512309ba89554735b7b08c5bf8ad69257b3665e64 afl-latest.tgz"