blob: 323bbd0f588f1fa3060dc97245a8b497bc1a74f9 (
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
|
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=netdata
pkgver=1.12.2
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() {
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
# 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="06f42610ba6c11dac4fa921ac50b4a615ce245a7e4ede5b3bf7bc7f72ed1c93d03d7760294fd17163cab6434ee118d6ef06c11dcbace2a209aaf0769a184b0ca netdata-1.12.2.tar.gz
0cc96162524bec0562e7ba0449d7d39ca6edd1928e2c1ac9f579a1fe5ea442f8ce670d04e84d2cac7c09843a9df7ed8151a6a3d2377713ffba4c86b43b8d9096 netdata.initd"
|