aboutsummaryrefslogtreecommitdiffstats
path: root/community/afl/APKBUILD
diff options
context:
space:
mode:
authorAndré Klitzing <aklitzing@gmail.com>2017-08-23 11:18:30 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2017-08-24 23:19:38 +0000
commit5ba3c024a3f5c452dd7cbf849e5c7bcdaf3e78e4 (patch)
tree3f69ea9fa3e3261b20b66797e6d7d320bea6f848 /community/afl/APKBUILD
parenta19f7b681d100fa6d9beec5b80c9c3144a254f0f (diff)
downloadaports-5ba3c024a3f5c452dd7cbf849e5c7bcdaf3e78e4.tar.bz2
aports-5ba3c024a3f5c452dd7cbf849e5c7bcdaf3e78e4.tar.xz
community/afl: move from testing
Diffstat (limited to 'community/afl/APKBUILD')
-rw-r--r--community/afl/APKBUILD43
1 files changed, 43 insertions, 0 deletions
diff --git a/community/afl/APKBUILD b/community/afl/APKBUILD
new file mode 100644
index 0000000000..f6b1577823
--- /dev/null
+++ b/community/afl/APKBUILD
@@ -0,0 +1,43 @@
+# Contributor: Marian <marian.buschsieweke@ovgu.de>
+# Maintainer: Marian <marian.buschsieweke@ovgu.de>
+pkgname=afl
+pkgver=2.50b
+pkgrel=0
+pkgdesc="American fuzzy lop - a fuzzer relying on genetic algorithms instead brute force"
+url="http://lcamtuf.coredump.cx/afl/"
+arch="all"
+license="ASL 2.0"
+depends="clang llvm"
+makedepends="clang-dev llvm-dev"
+subpackages="$pkgname-doc"
+source="http://lcamtuf.coredump.cx/$pkgname/releases/$pkgname-$pkgver.tgz"
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+ local dir; for dir in "$builddir" "$builddir"/llvm_mode; do
+ make -C "$dir" PREFIX=/usr CC=clang AFL_NO_X86=1
+ done
+}
+
+package() {
+ cd "$builddir"
+
+ make AFL_NO_X86=1 PREFIX=/usr DESTDIR="$pkgdir" install
+ install -Dm644 llvm_mode/README.llvm \
+ "$pkgdir"/usr/share/doc/$pkgname/README.llvm_mode
+
+ # Only install the llvm_mode of afl. Even though this is still
+ # considered experimental it is faster than the gcc mode and
+ # portable to non-x86 platforms.
+ rm -f "$pkgdir/usr/bin/afl-clang" "$pkgdir/usr/bin/afl-clang++" \
+ "$pkgdir/usr/bin/afl-gcc" "$pkgdir/usr/bin/afl-g++"
+
+ # small_exec.elf is an Intel binary which causes an error during
+ # the strip() process on non Intel plattforms.
+ case "$CARCH" in
+ x86*) ;;
+ *) rm -f "$pkgdir"/usr/share/afl/testcases/others/elf/small_exec.elf ;;
+ esac
+}
+
+sha512sums="a06cc3c8f0613e105805b4dfba59fffcc2b6d9b519df56dc4af7085f1edffa1a63b9a5cccd1b65354b87584c7b060f71b50e7ad29f55584799d20479b898a4f9 afl-2.50b.tgz"