# Maintainer: Daniel Isaksen pkgname=yara pkgver=3.6.3 pkgrel=0 pkgdesc="The pattern matching swiss knife for malware researchers" url="https://virustotal.github.io/yara/" arch="all" license="BSD-3-Clause" makedepends="automake file-dev libressl-dev autoconf libtool flex" source="$pkgname-$pkgver.tar.gz::https://github.com/VirusTotal/$pkgname/archive/v$pkgver.tar.gz" subpackages="$pkgname-doc" builddir="$srcdir/$pkgname-$pkgver" prepare() { default_prepare # Delete re_lexer.c to force it to be build with new version # of flex, othwewise tests fail in some arches because of a bug # in older version of flex. # See: https://github.com/VirusTotal/yara/issues/771 rm "$srcdir"/yara-3.6.3/libyara/re_lexer.c } build() { cd "$builddir" autoreconf -fiv ./configure \ --prefix=/usr \ --with-crypto \ --enable-magic make } package() { cd "$builddir" make DESTDIR="$pkgdir" install install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname"/COPYING install -Dm 644 README.md "$pkgdir/usr/share/doc/$pkgname"/README.md cp -r docs "$pkgdir/usr/share/doc/$pkgname" } check() { cd "$builddir" make check || return 1 } sha512sums="f928fe93e93385b5711c1076b042473299e1eb1c7c345433b01b7638677d9b8fb95a8ac2a7ef52012dc178ec0ef5772d6b6d0b65b5717d2074290bb44031b3f8 yara-3.6.3.tar.gz"