# Contributor: Leonardo Arena # Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=ospd-openvas pkgver=22.5.4 pkgrel=0 pkgdesc="ospd-openvas is an OSP server implementation to allow GVM to remotely control an OpenVAS Scanner" url="https://github.com/greenbone/ospd-openvas" arch="noarch" license="AGPL-3.0-or-later" pkgusers="gvm" pkggroups="gvm" depends=" py3-defusedxml py3-deprecated py3-gnupg py3-lxml py3-packaging py3-paho-mqtt py3-psutil py3-redis mosquitto " makedepends="py3-gpep517 py3-installer py3-poetry-core" checkdepends="py3-pytest py3-gnupg" subpackages="$pkgname-openrc $pkgname-pyc" install="$pkgname.post-install" source="$pkgname-$pkgver.tar.gz::https://github.com/greenbone/ospd-openvas/archive/v$pkgver.tar.gz $pkgname.initd ospd.conf fix-test-unlink.patch " build() { gpep517 build-wheel \ --wheel-dir .dist \ --output-fd 3 3>&1 >&2 } check() { if [ $arch = "x86" ]; then pytest --deselect tests/messaging/test_mqtt.py::MQTTDaemonTestCase else python3 -m venv --clear --without-pip --system-site-packages .testenv .testenv/bin/python3 -m installer .dist/*.whl .testenv/bin/python3 -m pytest fi } package() { python3 -m installer -d "$pkgdir" \ .dist/*.whl install -d -o $pkgusers -g $pkggroups "$pkgdir"/run/ospd install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname install -Dm644 "$srcdir"/ospd.conf "$pkgdir"/etc/openvas/ospd.conf } sha512sums=" 21d2f3aeccbba3899e5eeb282460ca2a1f24e2caf30537fe0ea1a9304d721683d49d8c57fd7baac60dd29e89a361becd013eb4afee1aa0a3860c10ef342be0ff ospd-openvas-22.5.4.tar.gz 264aa78a9909011de6800cf2839d2729bde4c2a8689d7a550c573d2d489c39dc224d7dc52d59210518aa1e2a9ae6a94beac978126f573bd87f378b6fa57511cf ospd-openvas.initd 2f571f41b34599cc0fb772203f69c781f9c6b043d1451fbd0f930d8040a6888dd832578ac8afdba3015db926b51c7ada56dd435e72f9fa4fffb99d2e769d74aa ospd.conf d266ad2cfdcf869cdbe8cfd06a0fa354e583cc2dfa4c3aaf2b478b5af3524a2a39d53ae08ac4816881bbca264262258ed08d077dc0e5a344a9ad091cbc1a656e fix-test-unlink.patch "