aboutsummaryrefslogtreecommitdiffstats
path: root/community/gvm-libs/APKBUILD
blob: df0b218837d9123b0aef6f9c8216b71a2c48184d (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
68
69
70
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=gvm-libs
pkgver=11.0.0
pkgrel=1
pkgdesc="Greenbone Vulnerability Management Libraries"
url="http://www.openvas.org/"
arch="all"
license="GPL-2.0"
options="!nocheck" # test fails: https://github.com/greenbone/gvm-libs/issues/279
pkgusers="gvm"
pkggroups="gvm"
install="$pkgname.pre-install"
makedepends="cmake bison glib-dev libpcap-dev libssh-dev
	hiredis-dev gnutls-dev util-linux-dev
	libgcrypt-dev libksba-dev openldap-dev
	gpgme-dev gpgmepp net-snmp-libs e2fsprogs-dev
	clang-dev freeradius-client-dev
	doxygen libxslt graphviz xmltoman perl-sql-translator"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/greenbone/gvm-libs/archive/v$pkgver.tar.gz
	malloc-trim.patch
	support-gnutls-missing.patch
	fix-sigsegv-no-plugin_feed_info.inc-file-present.patch
	glib-include-path.patch"

prepare() {
	default_prepare
	mkdir build
}

build() {
	cd $builddir/build
	cmake -DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_STATIC=0 \
		-DBUILD_SHARED=1 \
		-DLIBDIR=/usr/lib \
		-DSYSCONFDIR=/etc \
		-DLOCALSTATEDIR=/var \
		-DGVM_PID_DIR=/var/lib/gvm \
	..
	make
}

check() {
	cd $builddir/build
	return 0
}

package() {
	cd $builddir/build
	make DESTDIR="$pkgdir" install
	mkdir -p "$pkgdir"/var/lib/gvm
	chown -R $pkgusers:$pkggroups "$pkgdir"/var/lib/gvm
}

doc() {
	cd $builddir/build
	default_doc
	make doc
	mkdir -p "$subpkgdir"/usr/share/doc/$pkgname
	mv doc/generated/* "$subpkgdir"/usr/share/doc/$pkgname
}

sha512sums="ff981b4ca37b425a8d1f491e90bd1cef4701033886f9fd47dad34540b36fa275d4af8b176e63a07405cc1f29137851b96a6ce80c46ed92f809b089fb0cd928af  gvm-libs-11.0.0.tar.gz
ae93ac7ec929325926d785bb58ed9c09f8bdaf518adf09db54bb9a8a4b5e4474c0ab61fc987c91114f2013cbe39868115006b528865fbd027e5b88eca58f1954  malloc-trim.patch
dcb83b3ec8a4d21b6097c0eb67e28b3e9abb128b691d143788713fbffd704c132e4fa552fb9fc773e32888a8d5006d56647f28ff7d0b8833e1911a3a94acc4a4  support-gnutls-missing.patch
4da0ad259926bba976ed634501500bb8a38ac3f2ff873aad1a3de8a86ae29032ec22cb8a494d3144945f6fab49031e228f4262032b007b41b3a123893b86be93  fix-sigsegv-no-plugin_feed_info.inc-file-present.patch
c0fe0add24cb4336f0ce313197042e60a3aba3eeb983f31b243e665a488e520ffa260ab9a3feb852500310a9df66f2eaf82ac4294d7980b983a78454b30eb9f9  glib-include-path.patch"