aboutsummaryrefslogtreecommitdiffstats
path: root/community/gvm-libs/APKBUILD
blob: 910407a054381a3962ef37bc328365c6b705c45b (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
71
72
73
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=gvm-libs
pkgver=21.4.3
pkgrel=1
pkgdesc="Greenbone Vulnerability Management Libraries"
url="https://www.openvas.org/"
arch="all"
license="GPL-2.0-or-later"
options="!check" # 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
	libxml2-dev libnet-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/greenbone/gvm-libs/archive/v$pkgver.tar.gz
	malloc-trim.patch
	glib-include-path.patch
	strptime.patch
	use-posix-addr-struct.patch"

prepare() {
	default_prepare
	mkdir build
}

build() {
	cd $builddir/build
	cmake -DCMAKE_BUILD_TYPE=None \
		-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="
68fa7b8ce6db64bbd7eb9862891cbdae1abb04d80b4dc0dbea1a5b027a4bf1c0450dce83185d3007799f3f31830a3e014263677e04354ee15fbc8b9b20f1d525  gvm-libs-21.4.3.tar.gz
ae93ac7ec929325926d785bb58ed9c09f8bdaf518adf09db54bb9a8a4b5e4474c0ab61fc987c91114f2013cbe39868115006b528865fbd027e5b88eca58f1954  malloc-trim.patch
c0fe0add24cb4336f0ce313197042e60a3aba3eeb983f31b243e665a488e520ffa260ab9a3feb852500310a9df66f2eaf82ac4294d7980b983a78454b30eb9f9  glib-include-path.patch
b10f2b6a8e126a184c65c91bdd18a21e4ee16cbc442775288a11c2768c8e5c1db4ce3749025e7cc3f360c7c1011b79dca836fee742fb9f06034ca0a986f718b5  strptime.patch
1641f2c728eecf318850446a53d6a7baf53efd33caebd1de27007a227cf48ad8d7d8ef3183d519aade2167dc9cfab3a0e33c6f37ec83b21808742f201f11e781  use-posix-addr-struct.patch
"