aboutsummaryrefslogtreecommitdiffstats
path: root/testing/netdata/APKBUILD
blob: 5e355473ec892f28503023a0c45bb401833a0d6c (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=netdata
pkgver=1.4.0
pkgrel=0
pkgdesc="Real-time performance monitoring, done right!"
url="https://github.com/firehol/netdata"
license="GPL"
arch="all"
depends="bash"
makedepends="zlib-dev e2fsprogs-dev"
pkgusers="netdata"
pkggroups="netdata"
subpackages="$pkgname-nodejs $pkgname-python"
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 || return 1
	make || return 1
}

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

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 || return 1
}

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 || return 1
}

md5sums="fd4928e440eece6a80af8627a5d9a235  netdata-1.4.0.tar.xz
e0976f4fa4e36dd49a60bac73ca01f28  netdata.initd"
sha256sums="22e293aae156759d220b36ff02fa496548e7386cb4ee53df660fde57418e69ea  netdata-1.4.0.tar.xz
eb6663a1057a4e400b37a1012d7bfc5eb10238d310717ec055a20d5260477a56  netdata.initd"
sha512sums="b5f60931372f0c6a437d1340bd9bb07557d8a9ffb478381715495c09c9b9bcf71f287c2e47be40945149a268e0f666289c75cc4eb1d1ab6fc73988f6b71daaf3  netdata-1.4.0.tar.xz
2aaaee7010c24b3f52be8b01295f73ac6c38ac4d1b627e8b9227d03fe3b248b7157b1d5217edebd88ba461adc1ce89503520acd877b300e4503e75125f40da96  netdata.initd"