mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
added community/netdata
This commit is contained in:
parent
af82dd08c4
commit
dd9914082e
2 changed files with 71 additions and 0 deletions
45
community/netdata/PKGBUILD
Normal file
45
community/netdata/PKGBUILD
Normal file
|
@ -0,0 +1,45 @@
|
|||
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
|
||||
# Contributor: SanskritFritz (gmail)
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - disable LTO
|
||||
|
||||
pkgname=netdata
|
||||
pkgver=1.6.0
|
||||
pkgrel=1
|
||||
pkgdesc="Real-time performance monitoring, in the greatest possible detail, over the web."
|
||||
url="https://github.com/firehol/netdata/wiki"
|
||||
arch=('i686' 'x86_64')
|
||||
license=('GPL')
|
||||
depends=('libmnl' 'libnetfilter_acct' 'zlib')
|
||||
optdepends=('nodejs: Webbox plugin'
|
||||
'lm_sensors: sensors module')
|
||||
backup=('etc/netdata/netdata.conf' 'etc/netdata/charts.d.conf' 'etc/netdata/apps_groups.conf')
|
||||
install="$pkgname.install"
|
||||
source=("https://github.com/firehol/netdata/releases/download/v${pkgver}/netdata-${pkgver}.tar.xz")
|
||||
sha512sums=('e091c2b3a619f62c209d2de8389bc33f98159071730344b17b66a766a3dcf2f598c95f10dbaf1421e32a468f18c975373291e3909002e9bf21dea9939559e1fc')
|
||||
|
||||
build() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
./autogen.sh
|
||||
./configure \
|
||||
--prefix="/usr" \
|
||||
--sbindir="/usr/bin" \
|
||||
--sysconfdir="/etc" \
|
||||
--libexecdir="/usr/lib" \
|
||||
--localstatedir="/var" \
|
||||
--with-zlib --with-math --with-user=netdata --disable-lto
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
make DESTDIR="$pkgdir" install
|
||||
|
||||
touch "$pkgdir/etc/netdata/netdata.conf"
|
||||
|
||||
install -Dm0644 "system/netdata.service" "$pkgdir/usr/lib/systemd/system/netdata.service"
|
||||
}
|
||||
|
26
community/netdata/netdata.install
Normal file
26
community/netdata/netdata.install
Normal file
|
@ -0,0 +1,26 @@
|
|||
chown_netdata() {
|
||||
chown -R netdata:netdata /var/lib/netdata
|
||||
chown -R netdata:netdata /var/log/netdata
|
||||
chown -R netdata:netdata /var/cache/netdata
|
||||
chown -R netdata:netdata /usr/share/netdata/web
|
||||
chown -R netdata:netdata /etc/netdata
|
||||
}
|
||||
|
||||
post_install() {
|
||||
getent group netdata > /dev/null || groupadd -g 134 netdata 1>/dev/null
|
||||
getent passwd netdata > /dev/null || useradd -u 134 -d /var/cache/netdata -g netdata -s /bin/nologin netdata 1>/dev/null
|
||||
|
||||
chown_netdata
|
||||
|
||||
echo
|
||||
echo "After the daemon has been started for the first time,"
|
||||
echo "download the default config file from"
|
||||
echo "http://127.0.0.1:19999/netdata.conf"
|
||||
echo
|
||||
echo "Copy it to /etc/netdata/ and modify it."
|
||||
echo
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
chown_netdata
|
||||
}
|
Loading…
Reference in a new issue