aboutsummaryrefslogtreecommitdiffstats
path: root/testing/netdata/APKBUILD
blob: a7d7065361c763fbe558b7896f9ea9378a89e724 (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=netdata
pkgver=1.9.0
pkgrel=0
pkgdesc="Real-time performance monitoring"
url="https://github.com/firehol/netdata"
license="GPL3+"
arch="all"
depends="bash"
makedepends="zlib-dev e2fsprogs-dev"
pkgusers="netdata"
pkggroups="netdata"
subpackages="$pkgname-nodejs::noarch $pkgname-python::noarch"
install="$pkgname.pre-install"
source="https://github.com/firehol/netdata/releases/download/v$pkgver/netdata-$pkgver.tar.xz
	$pkgname.initd"
builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--with-zlib \
		--with-math \
		--with-webdir=/usr/share/webapss/netdata \
		--with-user=netdata
	make
}

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

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	chgrp -R $pkggroups "$pkgdir"/usr/share/webapss/netdata
	chown -R $pkgusers:$pkggroups $pkgdir/var/lib/netdata \
		$pkgdir/var/cache/netdata
	install -Dm755 $srcdir/$pkgname.initd \
		$pkgdir/etc/init.d/$pkgname
	install -Dm644 ./system/netdata.conf $pkgdir/etc/netdata/netdata.conf
}

nodejs() {
	pkgdesc="$pkgdesc (nodejs support)"
	depends="$pkgname nodejs"
	mkdir -p "$subpkgdir"/usr/libexec/netdata
	mv $pkgdir/usr/libexec/netdata/node.d \
		$subpkgdir/usr/libexec/netdata
}

python() {
	pkgdesc="$pkgdesc (python support)"
	depends="$pkgname python2"
	mkdir -p "$subpkgdir"/usr/libexec/netdata
	mv $pkgdir/usr/libexec/netdata/python.d \
		"$subpkgdir"/usr/libexec/netdata
}

sha512sums="3766c8b86229545dee8fed3a43a5dd73ba36db9114b2418a6ceaaba15488edf792308be922dafed34026fd52166257fc27823ce0f6664696f79b33b93345f2b5  netdata-1.9.0.tar.xz
2aaaee7010c24b3f52be8b01295f73ac6c38ac4d1b627e8b9227d03fe3b248b7157b1d5217edebd88ba461adc1ce89503520acd877b300e4503e75125f40da96  netdata.initd"