aboutsummaryrefslogtreecommitdiffstats
path: root/community/gvm-libs/APKBUILD
blob: 1c9a2b9908327fc0ccec4f0567524b6f9912d0e0 (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=gvm-libs
pkgver=20.8.1
pkgrel=0
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"
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"

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="846b062b849688019715cbff1d6c4f6a1b4dd8c58cfdef78ea08df3cd104810e9091385cca3c49618538a28c42c0fe78a38fb934fbde604aef86e84c4f2dda94  gvm-libs-20.8.1.tar.gz
ae93ac7ec929325926d785bb58ed9c09f8bdaf518adf09db54bb9a8a4b5e4474c0ab61fc987c91114f2013cbe39868115006b528865fbd027e5b88eca58f1954  malloc-trim.patch
c0fe0add24cb4336f0ce313197042e60a3aba3eeb983f31b243e665a488e520ffa260ab9a3feb852500310a9df66f2eaf82ac4294d7980b983a78454b30eb9f9  glib-include-path.patch
b10f2b6a8e126a184c65c91bdd18a21e4ee16cbc442775288a11c2768c8e5c1db4ce3749025e7cc3f360c7c1011b79dca836fee742fb9f06034ca0a986f718b5  strptime.patch"