# Maintainer: Vladimir Vitkov <vvitkov@gmail.com>
pkgname=nuzzle
pkgver=1.6
pkgrel=0
# as there is no official versioning code comes from git hash
# use the hash later on for shortening of commands
_gitcommit="21ae17dd8217bb7cf48a0b3296b90d82a31c0911"
pkgdesc="Lightweight, fast network attack detection IDS and IPS"
url="https://nuzzle.hackerfactor.com/"
arch="all"
license="custom"
makedepends="g++"
subpackages="$pkgname-doc"
options="toolchain !check"	# No test suite provided.
				# Single c file.
				# Author recommends using g++ for build
source="$pkgname-$pkgver.zip::https://github.com/hackerfactor/nuzzle/archive/$_gitcommit.zip"
prepare() {
	mkdir -p "$builddir"
	mv "$srcdir"/$pkgname-$_gitcommit/* "$builddir"/
	default_prepare
}

build() {
	g++ -Wall -o nuzzle nuzzle.c
}

package() {
	install -m755 -D "$builddir"/nuzzle "$pkgdir"/usr/sbin/nuzzle
	install -m644 -D "$builddir"/LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
	install -m644 -D "$builddir"/README.md "$pkgdir"/usr/share/doc/$pkgname/README.md
}
sha512sums="
cc12697deb45e7ec270258c41bc7ca44bd8369df9a1944d6fe19441c31d03ae4e9d5b9f8d3277cc28f955934764e0a7b2bf77336d94850d6ebd013be80686158  nuzzle-1.6.zip
"
