aboutsummaryrefslogtreecommitdiffstats
path: root/community/gvmd/APKBUILD
blob: 522954dd0b9260f84daac17c8f6fb1ba0e52559c (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=gvmd
pkgver=9.0.0
pkgrel=1
pkgdesc="Greenbone Vulnerability Manager"
url="http://www.openvas.org/"
arch="all"
license="GPL-2.0"
pkgusers="gvm"
pkggroups="gvm"
depends="rsync postgresql postgresql-contrib libxslt sed gnutls-utils gvm-libs"
makedepends="cmake gvm-libs-dev clang-dev glib-dev
	gpgme-dev libgcrypt-dev graphviz libical-dev
	postgresql-dev gnutls-dev
	doxygen libxslt xmltoman perl-sql-translator"
checkdepends="cppcheck"
subpackages="$pkgname-doc $pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/greenbone/gvmd/archive/v$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd
	$pkgname.logrotate

	greenbone-certdata-sync.conf
	greenbone-scapdata-sync.conf
	greenbone-nvt-sync.conf

	added-missing-includes.patch
	bin-openvas-change.patch
	fix-alpine-sql-syntax.patch
	sys-siglist.patch
	fix-gvm-port-update-name-and-backend.patch
	lockfile.patch"

prepare() {
	default_prepare
	mkdir build
}

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

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

package() {
	cd "$builddir"/build
	make DESTDIR="$pkgdir" install
	install -Dm644 "$srcdir/$pkgname.logrotate" "$pkgdir/etc/logrotate.d/$pkgname"
	install -Dm755 "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname"
	install -Dm755 "$srcdir/$pkgname.confd" "$pkgdir/etc/conf.d/$pkgname"
	for f in nvt certdata scapdata; do
		install -Dm755 "$srcdir"/greenbone-$f-sync.conf "$pkgdir"/etc/gvm/greenbone-$f-sync.conf
	done
	mkdir -p "$pkgdir"/var/log/gvm
	mkdir -p "$pkgdir"/var/lib/gvm
	mkdir -p "$pkgdir"/var/lib/openvas
	mkdir -p "$pkgdir"/var/run/gvmd
	chown -R $pkgusers:$pkggroups "$pkgdir"/var/log/gvm/
	chown -R $pkgusers:$pkggroups "$pkgdir"/var/lib/gvm/
	chown -R $pkgusers:$pkggroups "$pkgdir"/var/lib/openvas
	chown -R $pkgusers:$pkggroups "$pkgdir"/var/run/gvmd

}

doc() {
	default_doc
	mkdir -p "$subpkgdir"/usr/share/doc/$pkgname
	cat >"$subpkgdir"/usr/share/doc/$pkgname/README.alpine <<EOF
	** Add texlive to generate PDF reports with
	** apk add texlive
EOF
}


sha512sums="ffb6a61eefd3cf6514fea4030275d24f0f5c23514498a4d828c5f5ffc5344bf20452cbc7a09cd750adc237c036f30f002036c94292822d50cd9cba4b5db07458  gvmd-9.0.0.tar.gz
71c329f425c92159882dec37317e80d3e5c93abba04ea92b735d2a1d6a156ab5c379fdca5fa9b2816ae1e0f961dbac55b17452d6d1ad41f1dfb317976679cb32  gvmd.initd
63ca41e839e40292e4e6eb93947866ae2626f375353dfc142a9618f5bfb87e843f924e5a2ab3f24b5c30ac1c7c8791a5b323cbe2e88fb3c4cfc9713647f8eec2  gvmd.confd
e1eeef173bfab7c750efcc7faa42cf7a1cfb9e6b137716063f273bc709c1346f11262dadbdb0c49822d885dc00177d8ccb91c0491ddc33cfee0a3827f11908f6  gvmd.logrotate
17df9386fc1dccf2fbe3b8d1fd499171f6681b61afe7b4c11ff9debc008798b31d1d02d59463031482d94e10833f0e71bde27cbbe422f23738c77b7c6ada79d2  greenbone-certdata-sync.conf
37dbbd3f92f8baee8e89c274d820e03cba5ed5469a826f118897035c2f7719a915a71a6069eb6bf7f9a72e798b7837af9a6f25709215683d9d264292b5ccad66  greenbone-scapdata-sync.conf
964779adc39cbed191bccf02ccc408a263860002d2dbddee755cf0d015336814b0b3c83f88a02cc0c5959657be5c49eb94380cd6ba15844e4b6088e49cd7a3f0  greenbone-nvt-sync.conf
b5411a618e62e5a64fae3441d7f8a4db1fb7675200d8ce5f8208b09c6459b33920f3a65519c8d17781929917eeb4966e60701e64612c6cfcb77101130f779992  added-missing-includes.patch
8d711e7411c92aaa1fb7d2cb3bce1aae80e8843703fca15dcac202619907589e43ef0575e26470e075d6517bca150b777b1fa1afd32f900ca3e36537bacb17e4  bin-openvas-change.patch
5b7645912e107f67e1cc64cdb817404bc5212c41328201cfcc048a3ee73cf3c135b5128f1da6e84946ddc9361751b3da92518e493d940c2bbbda0c8ada8f3d5f  fix-alpine-sql-syntax.patch
682ae0efb02c565ed28d67c3adc5d181fb0ac43d670573f0d9587cb6ff9d4dd89eaf1f43f0fab3928e447bee735958afec0f31c70f5ceffac3c68633469ff71a  sys-siglist.patch
981c4cb32e5ef46be97b0c2d3cb24ab8b49226212104eb56c49216d976a5ae3cda3518e7629c0417dd22c94cf2fe19c34b6a5d4efd291c06747db84e7be76596  fix-gvm-port-update-name-and-backend.patch
ef23f5bb64371f4e11eae0830a0c7a6a6463b792b2907cbc0527b1cf5a273927f676a254634ee3228315b44b6ca56716d3dce122dd43937fed79f2a443ae2d3d  lockfile.patch"