blob: d07d8def5c20173c6d1ca09e95e8eb84721d34e1 (
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
90
91
92
93
94
95
96
97
|
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=netdata
pkgver=1.21.1
pkgrel=0
pkgdesc="Real-time performance monitoring"
url="https://www.netdata.cloud/"
license="GPL-3.0-or-later"
arch="all"
depends="bash"
makedepends="zlib-dev e2fsprogs-dev linux-headers libcap-dev automake autoconf
openssl-dev libuv-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/archive/v$pkgver.tar.gz
$pkgname.initd"
prepare() {
default_prepare
autoreconf -i
}
build() {
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--with-zlib \
--with-math \
--enable-https \
--with-webdir=/usr/share/webapss/netdata \
--with-user=netdata
make
}
check() {
msg "check"
make check
}
package() {
make DESTDIR="$pkgdir" install
chgrp -R $pkggroups "$pkgdir"/usr/share/webapss/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
install -d -Dm0750 -o netdata -g netdata "$pkgdir"/var/log/netdata
install -d -Dm0750 -o netdata -g netdata "$pkgdir"/var/cache/netdata
}
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 (python3 support)"
depends="$pkgname python3"
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="66d2e0cb977275250fd7b51e5156957a4506ddba586de5fe796459ea241cbbed7013fd4cf9d7acf6666407352fb34e3b962a2d01565a9cb982c89c76b7cd79b9 netdata-1.21.1.tar.gz
98dd8f188dfffe1221d05a4dd369e8f4f8dc2bf7a722ac8769afd351324b53b37c5675e705a4d42d20ce93ea9497fda9eb2457edaa500d4e72c9f1350b1d4652 netdata.initd"
|