aboutsummaryrefslogtreecommitdiffstats
path: root/community/openvas-scanner/APKBUILD
blob: 170fdd05a337917d98348fe9e74c41b11bf085e4 (plain)
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
68
69
70
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=openvas-scanner
_pkgname=openvassd
pkgver=5.1.1
_pkgid=2423
pkgrel=1
pkgdesc="The OpenVAS scanning Daemon"
url="http://www.openvas.org/"
arch="all"
license="GPL"
depends="redis nmap coreutils libressl"
makedepends="cmake openvas-libraries-dev glib-dev
	doxygen xmltoman"
subpackages="$pkgname-doc"
source="http://wald.intevation.org/frs/download.php/$_pkgid/$pkgname-$pkgver.tar.gz
	$_pkgname.initd
	$_pkgname.confd
	$_pkgname.conf
	$_pkgname.logrotate
	openvas-nvt-sync.cron
	002-execinfo-musl-fix.patch"

builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	cmake -DCMAKE_BUILD_TYPE=Release \
		-DSBINDIR=/usr/bin \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DSYSCONFDIR=/etc \
		-DLOCALSTATEDIR=/var .
	make || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir/" install
	install -Dm644 "$srcdir/$_pkgname.logrotate" "$pkgdir/etc/logrotate.d/$_pkgname"
	install -m755 -D "$srcdir"/$_pkgname.initd "$pkgdir"/etc/init.d/$_pkgname
	install -m755 -D "$srcdir"/$_pkgname.confd "$pkgdir"/etc/conf.d/$_pkgname
	install -m755 -D "$srcdir"/$_pkgname.conf "$pkgdir"/etc/openvas/$_pkgname.conf
	install -Dm744 "$srcdir"/openvas-nvt-sync.cron \
		"$pkgdir"/etc/periodic/daily/openvas-nvt-sync

	mkdir -p "$pkgdir"/usr/share/doc/$_pkgname
	cat >"$pkgdir"/usr/share/doc/$_pkgname/README.alpine <<EOF
	** In order to make openvas-scanner daemon start, redis server needs to run and  listen to a socket.
	** This is a part of redis.conf that should be adjusted:

		unixsocket /tmp/redis.sock
		unixsocketperm 700
		port 0 # prevent redis from listening on a TCP socket
		timeout 0
		#DB = 1 + (#of parallel tasks) * (#of parallel hosts)
		databases 128
		#CLI = 1 + (#of parallel tasks) * (#of parallel hosts) * (#of concurrent NVTs)
		maxclients 512
	** Further info can be found to:
		https://svn.wald.intevation.org/svn/openvas/tags/openvas-scanner-release-$pkgver/doc/redis_config.txt

EOF
}
sha512sums="8ca23fe9581c98381c030ee8e30a09876d538133980a589eff357321d2ceea0b24dbf8965ef7417e12abb9af240c6a26413b3041b219d28017c7f9ea04779fe1  openvas-scanner-5.1.1.tar.gz
fe8f81ac4d326611d077dc2c81d74f8e1e2c7b9e10eaaf3d30b2dcd8d2ede40ec060ff70678bda7445b5c1d8d758e164ab8bb9c06258afde2b10a0c241927cc3  openvassd.initd
47304976c18f1a561aec8e21406864d086898153b307dcc8e92117c400c9379e448920c2bbebc4b0b18fbb65c19a3d00d4d3e24a1a9a81d788a59fdc40bc0154  openvassd.confd
0d203cd2dfcf0b77ce8d2546235de16f23ea71c7e601db557fcd67e9c8dc460029494f1a146daadb44101ae194d7fa4d511a488bb69094e5470de9e10acf008b  openvassd.conf
5934a31ef4b7267fd741c41bb97fe2e1e42735d2324cce07145de1942efae3f5e42e8652ec0c3482dd53477be420a58124eae943f254105547abf065febb9046  openvassd.logrotate
92f1700ba15e04f0d830ac04db8c61bffb06104692fd91386a7f67ad8cc4bd1ea92651207a615c4bc56abc3a6c4f2fcf54fad52779fe5c6169d38f98b83513ea  openvas-nvt-sync.cron
e7930a80b47213dbe3f4d4266ab9ad778f67c3b33a1e94578527d78335b2db05ced1ede893f656e6da98278c7c060a2ced8156a61dfbf15a74d7987ae1cdb745  002-execinfo-musl-fix.patch"