blob: 2799c594d775ecde0374590aa0d2699408155a47 (
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=netdata
pkgver=1.14.0
pkgrel=0
pkgdesc="Real-time performance monitoring"
url="https://github.com/netdata/netdata"
license="GPL-3.0-or-later"
arch="all"
depends="bash"
makedepends="zlib-dev e2fsprogs-dev linux-headers libcap-dev"
pkgusers="netdata"
pkggroups="netdata"
subpackages="$pkgname-openrc $pkgname-nodejs::noarch $pkgname-python::noarch"
install="$pkgname.pre-install"
source="$pkgname-$pkgver.tar.gz::https://github.com/netdata/netdata/releases/download/v${pkgver}/netdata-v${pkgver}.tar.gz
$pkgname.initd"
builddir="$srcdir"/$pkgname-v${pkgver}
build() {
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--with-zlib \
--with-math \
--with-webdir=/usr/share/webapss/netdata \
--with-user=netdata
make
}
check() {
make check
}
package() {
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
# cap needed for disk I/O utilization reporting
setcap cap_dac_read_search,cap_sys_ptrace+ep \
"$pkgdir"/usr/libexec/netdata/plugins.d/apps.plugin
}
nodejs() {
pkgdesc="$pkgdesc (nodejs support)"
depends="$pkgname nodejs"
mkdir -p "$subpkgdir"/etc/netdata
mkdir -p "$subpkgdir"/usr/libexec/netdata/plugins.d
mkdir -p "$subpkgdir"/usr/lib/netdata/conf.d
mv $pkgdir/usr/libexec/netdata/node.d \
$subpkgdir/usr/libexec/netdata
mv $pkgdir/usr/libexec/netdata/plugins.d/node.d.plugin \
$subpkgdir/usr/libexec/netdata/plugins.d
mv $pkgdir/etc/netdata/node.d \
$subpkgdir/etc/netdata/
mv $pkgdir/usr/lib/netdata/conf.d/node.d.conf \
$subpkgdir/usr/lib/netdata/conf.d
}
python() {
pkgdesc="$pkgdesc (python support)"
depends="$pkgname python2"
mkdir -p "$subpkgdir"/etc/netdata
mkdir -p "$subpkgdir"/usr/libexec/netdata/plugins.d
mkdir -p "$subpkgdir"/usr/lib/netdata/conf.d
mv $pkgdir/usr/libexec/netdata/python.d \
"$subpkgdir"/usr/libexec/netdata
mv $pkgdir/usr/libexec/netdata/plugins.d/python.d.plugin \
"$subpkgdir"/usr/libexec/netdata/plugins.d
mv $pkgdir/etc/netdata/python.d \
$subpkgdir/etc/netdata/
mv $pkgdir/usr/lib/netdata/conf.d/python.d \
$subpkgdir/usr/lib/netdata/conf.d
mv $pkgdir/usr/lib/netdata/conf.d/python.d.conf \
$subpkgdir/usr/lib/netdata/conf.d
}
sha512sums="593d3a0425838d0f82b5440e2158ac6e6d0ccf44a4fb267e6d528be0dc0da5a18b3981da5bcae8b27bb7fe6058541819fbe07aa6fc9fac33b4710a3c0663df6d netdata-1.14.0.tar.gz
0cc96162524bec0562e7ba0449d7d39ca6edd1928e2c1ac9f579a1fe5ea442f8ce670d04e84d2cac7c09843a9df7ed8151a6a3d2377713ffba4c86b43b8d9096 netdata.initd"
|