aboutsummaryrefslogtreecommitdiffstats
path: root/community/greenbone-security-assistant/APKBUILD
blob: ed59b1f49a2843ae4fad5110ecea7f2129f6473b (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=greenbone-security-assistant
_pkgname=gsad
pkgver=21.4.3
pkgrel=0
pkgdesc="Greenbone Security Assistant (gsa) - OpenVAS web frontend"
url="https://www.openvas.org/"
arch="all !mips !mips64 !riscv64" # no nodejs on riscv64
license="GPL-2.0-or-later"
depends="wget"
makedepends="cmake doxygen xmltoman graphviz gvm-libs-dev
	libxslt-dev libmicrohttpd-dev py3-polib libgcrypt-dev
	nodejs-current npm yarn clang-dev"
checkdepends="cppcheck"
subpackages="$pkgname-doc $pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/greenbone/gsa/archive/v$pkgver.tar.gz
	$_pkgname.initd
	$_pkgname.logrotate
	gsad-sbin.patch
	musl-stack-size.patch
	remove-husky-git-hook.patch
	"
builddir="$srcdir/gsa-$pkgver"

case "$CARCH" in
	# cppcheck not available
	aarch64|s390x) options="!check";;
esac

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DSYSCONFDIR=/etc \
		-DSBINDIR=/usr/sbin \
		-DLOCALSTATEDIR=/var \
		-DDEFAULT_CONFIG_DIR=/etc/default \
		-DLOGROTATE_DIR=/etc/logrotate.d

	make -C build
}

check() {
	make -C build check
}

package() {
	make -C build DESTDIR="$pkgdir" install
	install -Dm644 "$srcdir"/$_pkgname.logrotate "$pkgdir"/etc/logrotate.d/$_pkgname
	install -Dm755 "$srcdir"/$_pkgname.initd "$pkgdir"/etc/init.d/$_pkgname
	rm -rf "$pkgdir"/usr/lib/systemd
}

sha512sums="
6ddf25829afcdf62b7b589d7d2cf1e141ea95907019ad5ca01c3546d48df702f5c3aa56b9556acfcc5c4b5f3412c909eaab7a9ebca937dcf0b0b423ea3038aa3  greenbone-security-assistant-21.4.3.tar.gz
1f46b6b62f0f397ad6a6889442979a8a7a53368e6fa9fb6ecb3e56e5719df466d4c6b4452992c558189e272ec423202afafba96cc8ebda79e988953e66f2292f  gsad.initd
ab43f8c54cf72e2a800bdcf4daebeabfa18a7ef49f098d65e70f97ccab3d36606c353b82b8fd6b4f2cecd289d36f48f805a5c34cba86f8e8c61bf074b0afe695  gsad.logrotate
3afa191863e1056182f8abf7f6d9a65cbd5d3fd69a522c5e414e19fcf2dd6d02eb8b5b2867383eaa659ce913f169c0739a4bc1209996879337b60ccd80d0bcfa  gsad-sbin.patch
ad78cce9f4f21157d679e227698896364c33eac9c5af4228552b61c0f9bde0e3b2743ae6717766acde38d5445d08e60832b2b0418456cdb8a77a91b3c440735b  musl-stack-size.patch
e37be1d0c487a0647bf1fdc4b40f6220e92ef057d2196562075626a40c8e798a3b5a503f4cb46c04c45af7ffa9ddaefc40c996908048323ead5b15ddb5cea405  remove-husky-git-hook.patch
"