aboutsummaryrefslogtreecommitdiffstats
path: root/community/openvas/APKBUILD
blob: f5c66360171e8e4e67e03216ab247fcf8b713b4e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=openvas
pkgver=20.8.0
pkgrel=0
pkgdesc="Open Vulnerability Assessment Scanner"
url="https://openvas.org/"
arch="all"
license="GPL-2.0-only"
depends="redis nmap coreutils openssl util-linux"
install="$pkgname.post-install"
pkgusers="gvm"
checkdepends="cppcheck"
makedepends="cmake bison gvm-libs-dev glib-dev libgcrypt-dev
	doxygen xmltoman graphviz libpcap-dev gpgme-dev
	clang-dev libssh-dev libksba-dev net-snmp-dev"
subpackages="$pkgname-doc $pkgname-config"
source="$pkgname-$pkgver.tar.gz::https://github.com/greenbone/openvas/archive/v$pkgver.tar.gz
	greenbone-nvt-sync.cron
	execinfo-musl-fix.patch
	malloc-trim.patch
	openvas-sysctl.conf"
options="!check" # dependency tree not available outside x86

prepare() {
	default_prepare
	mkdir build
}

build() {
	cd $builddir/build
	cmake -DCMAKE_BUILD_TYPE=None \
		-DSBINDIR=/usr/bin \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DSYSCONFDIR=/etc \
		-DLOCALSTATEDIR=/var \
		-DOPENVAS_RUN_DIR=/var/run/ospd \
	..
	make
}

check() {
	cd $builddir/build
	make check
}

package() {
	cd $builddir/build
	make DESTDIR="$pkgdir" install
	chown $pkgusers "$pkgdir"/etc/openvas
	chown $pkgusers "$pkgdir"/var/log/gvm
	chown $pkgusers "$pkgdir"/var/lib/openvas/plugins
}

config() {
	pkgdesc="Configuration files and scripts for openvas"
	install -Dm744 "$srcdir"/greenbone-nvt-sync.cron \
		"$subpkgdir"/etc/periodic/daily/greenbone-nvt-sync
	install -Dm644 "$builddir"/config/redis-openvas.conf "$subpkgdir"/etc/redis-openvas.conf
	install -Dm644 "$srcdir"/openvas-sysctl.conf "$subpkgdir"/etc/sysctl.d/02-openvas.conf
}

sha512sums="179a38e96768a4e922fd978d6d47c9a2f6902fd4bb2b25f03b999001eb00ba06cacfb5be098b9909f67135c879a210d2b900bbb28b3aea467e379f2d1aec69f3  openvas-20.8.0.tar.gz
da53e5c5e3ab70749249c2bf6c4fe0e0d17a2afb39d4519eb7fdf873c3fedf925183db050ab5395a3fe7f1ce79d95bf4f55c69611205d00dc519ce15418bd915  greenbone-nvt-sync.cron
ffb2b6798eec54f39727e71ddc8e709c06b4dc8be37f05a87676233be3f0dd6701bdea6f61367af56b9d4342ec5e80489830d611ebe85861d7dda625941e785b  execinfo-musl-fix.patch
ae4f35ba0705eb16e98765f370a3225bbca6de4bcffeff20cde1d6d1a3487036ff5f683d9e38f0df3308770656876e240fc75c62ba9e2bb1d2e4998ac80e6395  malloc-trim.patch
1b85a5511e73a79bc2c9e11e773fee4d641a2f55760eb8e3f4a41cc0d73007e2f6300832c35dd2408838eb42efef54ba6e238a0ed551e34d21becc2aef499991  openvas-sysctl.conf"