mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-25 09:41:35 +01:00
116 lines
3.0 KiB
Plaintext
116 lines
3.0 KiB
Plaintext
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
|
|
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
|
|
pkgname=netdata
|
|
pkgver=1.34.1
|
|
pkgrel=0
|
|
pkgdesc="Real-time performance monitoring"
|
|
url="https://www.netdata.cloud/"
|
|
license="GPL-3.0-or-later"
|
|
arch="all"
|
|
depends="bash"
|
|
makedepends="
|
|
autoconf
|
|
automake
|
|
e2fsprogs-dev
|
|
libcap-dev
|
|
libuv-dev
|
|
linux-headers
|
|
lz4-dev
|
|
openssl1.1-compat-dev
|
|
zlib-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"
|
|
|
|
# temp allow textrels on riscv64
|
|
case $CARCH in
|
|
riscv64) options="$options textrels";;
|
|
esac
|
|
|
|
prepare() {
|
|
default_prepare
|
|
autoreconf -i
|
|
}
|
|
|
|
build() {
|
|
./configure \
|
|
--prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--localstatedir=/var \
|
|
--with-zlib \
|
|
--with-math \
|
|
--enable-https \
|
|
--with-webdir=/usr/share/webapps/netdata \
|
|
--with-user=netdata
|
|
make
|
|
}
|
|
|
|
check() {
|
|
msg "check"
|
|
make check
|
|
}
|
|
|
|
package() {
|
|
make DESTDIR="$pkgdir" install
|
|
chgrp -R $pkggroups "$pkgdir"/usr/share/webapps/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 -m0750 -o netdata -g netdata \
|
|
"$pkgdir"/var/lib/netdata \
|
|
"$pkgdir"/var/log/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="
|
|
191eab60b895c79cdeb014d37298a441b9811d78239a3f553b266911f260bc1edb6b9439bdf567e413712d883b1888173248c1784187096de9730fbbfc9e1f99 netdata-1.34.1.tar.gz
|
|
5a9af8de32dba1dd982cd0b0d696b60329cf834edd581e9b39c1e4ec21f5b6eb05e224e238ffd20f3e621c48c453841c09fdaba21318c49b23b3b2e4ef04b34d netdata.initd
|
|
"
|