# Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=notus-scanner pkgver=22.5.0 pkgrel=0 pkgdesc="Notus is a vulnerability scanner for creating results from local security checks " url="https://github.com/greenbone/notus-scanner" arch="noarch" license="AGPL-3.0-or-later" pkgusers="gvm" pkggroups="gvm" depends=" mosquitto paho-mqtt-c py3-gnupg py3-packaging py3-paho-mqtt py3-psutil " makedepends="py3-gpep517 python3-dev py3-poetry-core" checkdepends="py3-pytest" subpackages="$pkgname-openrc $pkgname-pyc" source="$pkgname-$pkgver.tar.gz::https://github.com/greenbone/notus-scanner/archive/refs/tags/v$pkgver.tar.gz notus-scanner.initd " build() { gpep517 build-wheel \ --wheel-dir .dist \ --output-fd 3 3>&1 >&2 } check() { python3 -m venv --clear --without-pip --system-site-packages .testenv .testenv/bin/python3 -m installer .dist/*.whl .testenv/bin/python3 -m pytest } package() { python3 -m installer -d "$pkgdir" .dist/*.whl install -d -o $pkgusers -g $pkggroups "$pkgdir"/var/lib/notus install -d -o $pkgusers -g $pkggroups "$pkgdir"/var/lib/openvas/plugins/notus/products install -d -o $pkgusers -g $pkggroups "$pkgdir"/run/notus-scanner install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname } sha512sums=" 48576d26a65c439fb00b345d97ba9917c3c2bf99ab5c94ed4488e4638c0442fdcd721ed8a08be147481a01bffc3eadec25029c0d6cd1aed2381221250b16c19d notus-scanner-22.5.0.tar.gz d5d6adb9ecdb074cefcc1575e277918bbbde83ddf75997c23bd53609147b434ef7f41ae08090625593616d0829059c141c4ec7f2e567167a40a2e2b3fcf3e903 notus-scanner.initd "