Subject: [alpine-aports] [PATCH] testing/yara: new aport

From: Daniel Isaksen <[email-masked]>
Date: Tue, 24 Oct 2017 14:04:57 +0000

---
 testing/yara/APKBUILD | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 testing/yara/APKBUILD

diff --git a/testing/yara/APKBUILD b/testing/yara/APKBUILD
new file mode 100644
index 0000000000..76103224e7
--- /dev/null
+++ b/testing/yara/APKBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Daniel Isaksen <[email-masked]>
+
+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"
+source="$pkgname-$pkgver.tar.gz::https://github.com/VirusTotal/$pkgname/archive/v$pkgver.tar.gz"
+subpackages="$pkgname-doc"
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+	cd "$builddir"
+	autoreconf -fiv
+	./configure \
+		--prefix=/usr \
+		--with-crypto \
+		--enable-magic
+	make
+}
+
+package() {
+	cd "$builddir"
+	make DESTDIR="$pkgdir" install
+	install -Dm 644 COPYING -t "$pkgdir/usr/share/licenses/$pkgname"
+	install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
+	cp -r docs "$pkgdir/usr/share/doc/$pkgname"
+}
+
+check() {
+	cd "$builddir"
+	make check || return 1
+}
+
+sha512sums="f928fe93e93385b5711c1076b042473299e1eb1c7c345433b01b7638677d9b8fb95a8ac2a7ef52012dc178ec0ef5772d6b6d0b65b5717d2074290bb44031b3f8  yara-3.6.3.tar.gz"
-- 
2.14.2

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Natanael Copa <[email-masked]>
Date: Wed, 25 Oct 2017 09:35:42 +0200

On Tue, 24 Oct 2017 14:04:57 +0000

>>> yara: Unpacking /var/cache/distfiles/yara-3.6.3.tar.gz...                   
/usr/bin/abuild: line 1: autoreconf: not found                                  
>>> ERROR: yara: all failed 

You need automake autoconf and libtool in makedepends.

I fixed that, but then i got:

install: can't create
'/home/ncopa/aports/testing/yara/pkg/yara/usr/share/licenses/yara/COPYING':
No such file or directory

I fixed that too and pushed.

Thanks!

---