mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 04:16:46 +02:00
testing/netdata: new aport
This commit is contained in:
parent
e76de920d4
commit
073e5c1312
65
testing/netdata/APKBUILD
Normal file
65
testing/netdata/APKBUILD
Normal file
@ -0,0 +1,65 @@
|
||||
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
|
||||
# Maintainer:
|
||||
pkgname=netdata
|
||||
pkgver=1.3.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/v1.3.0/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 python"
|
||||
mkdir -p "$subpkgdir"/usr/libexec/netdata
|
||||
mv $pkgdir/usr/libexec/netdata/python.d \
|
||||
"$subpkgdir"/usr/libexec/netdata || return 1
|
||||
}
|
||||
|
||||
md5sums="f2854aa2e127a1c9f86366f17524c382 netdata-1.3.0.tar.xz
|
||||
e0976f4fa4e36dd49a60bac73ca01f28 netdata.initd"
|
||||
sha256sums="bad5d259467ae42ceb0cf5f03fc4b37d094a81f21a772477e6ccc5b8a778bf15 netdata-1.3.0.tar.xz
|
||||
eb6663a1057a4e400b37a1012d7bfc5eb10238d310717ec055a20d5260477a56 netdata.initd"
|
||||
sha512sums="0e96f12cbeb7aeecb07b885a0f10940022741633e5cfd76d9f79c9efe3bce2583d96ae18995831fc48d6724f65357929dc5a4220521230ecfb8517f15e779217 netdata-1.3.0.tar.xz
|
||||
2aaaee7010c24b3f52be8b01295f73ac6c38ac4d1b627e8b9227d03fe3b248b7157b1d5217edebd88ba461adc1ce89503520acd877b300e4503e75125f40da96 netdata.initd"
|
||||
7
testing/netdata/netdata.initd
Normal file
7
testing/netdata/netdata.initd
Normal file
@ -0,0 +1,7 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
command=/usr/sbin/netdata
|
||||
command_args=""
|
||||
pidfile=/run/netdata.pid
|
||||
name="netdata"
|
||||
description="Real-time performance monitoring"
|
||||
3
testing/netdata/netdata.pre-install
Normal file
3
testing/netdata/netdata.pre-install
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
adduser -S -H -s /sbin/nologin -D netdata 2>/dev/null
|
||||
exit 0
|
||||
Loading…
x
Reference in New Issue
Block a user