PKGBUILDs/extra/netdata/PKGBUILD

75 lines
3.2 KiB
Bash
Raw Normal View History

2021-12-01 14:16:33 +00:00
# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
2017-03-26 21:34:52 +00:00
# Contributor: SanskritFritz (gmail)
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - disable LTO
pkgname=netdata
2023-08-29 20:17:08 +00:00
pkgver=1.42.2
pkgrel=1
2017-07-17 23:33:22 +00:00
pkgdesc="Real-time performance monitoring, in the greatest possible detail, over the web"
2018-11-06 13:51:20 +00:00
url="https://github.com/netdata/netdata"
2017-12-18 13:26:20 +00:00
arch=('x86_64')
2017-03-26 21:34:52 +00:00
license=('GPL')
2018-11-09 04:10:03 +00:00
backup=('etc/netdata/netdata.conf')
2020-12-28 04:15:59 +00:00
depends=('libmnl' 'libnetfilter_acct' 'zlib' 'judy' 'libuv' 'json-c' 'libcap' 'lz4' 'openssl' 'which' 'snappy' 'protobuf'
2023-05-09 01:55:43 +00:00
'libwebsockets' 'mongo-c-driver' 'libyaml')
2021-03-01 23:47:44 +00:00
makedepends=('cups')
2017-05-24 12:37:55 +00:00
optdepends=('nodejs: for monitoring named and SNMP devices'
'lm_sensors: for monitoring hardware sensors'
'iproute2: for monitoring Linux QoS'
'python: for most of the external plugins'
'python-psycopg2: for monitoring PostgreSQL databases'
2019-04-12 17:44:15 +00:00
'python-mysqlclient: for monitoring MySQL/MariaDB databases'
2017-05-24 12:37:55 +00:00
'python-requests: for monitoring elasticsearch'
'hddtemp: for monitoring hhd temperature'
2021-07-15 23:35:22 +00:00
'fping: for for fping module'
2017-05-24 12:37:55 +00:00
'apcupsd: for monitoring APC UPS'
2021-03-01 23:47:44 +00:00
'cups: for CUPS plugin'
2017-05-24 12:37:55 +00:00
'iw: for monitoring Linux as access point')
2022-01-27 00:34:28 +00:00
source=("$pkgname-$pkgver.tar.gz::https://github.com/netdata/netdata/releases/download/v$pkgver/netdata-v$pkgver.tar.gz"
2023-07-04 13:43:53 +00:00
"$pkgname.sysusers"
protobuf-23.patch)
2023-08-29 20:17:08 +00:00
sha512sums=('0d576bb79ba01672605fff54cf1c345933be74737dea16ac23d21c91151d3e2862ad1e828d7703f2d18e6fa74caf16db50c4eb122fd4bdc4cba4fbd0ea142553'
2023-07-04 13:43:53 +00:00
'a910809a823ba58ca7bdaa72e8d68427b48f452c1fbb2343fa182ecb0a091a7640e73af24b8ba2fdd90e00aed8ef53b7fccd25cb8f04ca9b9fa6c8e52223ca66'
'5a759d6fe29f6ded679ebe61189a81639adf4397219cb0f1128a1490702ca4b1e250a70ed3bb548ca37c53992659f9c910e1ddc8b167bc6cf1f518630b960e05')
prepare() {
cd $pkgname-v$pkgver
patch -p1 -i ../protobuf-23.patch # Fix build with protobuf 23
# protobuf 23 requires c++17
sed -e 's|\# AX_CXX_COMPILE_STDCXX(17, noext, optional)|AX_CXX_COMPILE_STDCXX(17, noext, optional)|' -i configure.ac
}
2017-03-26 21:34:52 +00:00
build() {
2021-04-15 14:05:49 +00:00
cd "$pkgname-v$pkgver"
2017-12-18 13:26:20 +00:00
2019-08-07 19:24:23 +00:00
autoreconf -i
2017-12-18 13:26:20 +00:00
./configure \
2020-12-28 04:15:59 +00:00
--prefix="/usr" \
--sbindir="/usr/bin" \
--sysconfdir="/etc" \
--libexecdir="/usr/lib" \
--localstatedir="/var" \
--with-zlib --with-math --with-user=netdata --disable-lto
2017-12-18 13:26:20 +00:00
make
2017-03-26 21:34:52 +00:00
}
package() {
2021-04-15 14:05:49 +00:00
cd "$pkgname-v$pkgver"
2017-03-26 21:34:52 +00:00
2017-12-18 13:26:20 +00:00
make DESTDIR="$pkgdir" install
2017-03-26 21:34:52 +00:00
2020-03-19 01:09:30 +00:00
install -Dm644 system/netdata.conf "$pkgdir"/etc/netdata/netdata.conf
2020-03-19 23:56:54 +00:00
chown -R 0:134 "$pkgdir"/usr/share/netdata/web
2017-03-26 21:34:52 +00:00
2023-05-09 01:55:43 +00:00
install -Dm0644 "system/systemd/netdata.service.v235" "$pkgdir/usr/lib/systemd/system/netdata.service"
install -Dm0644 "system/logrotate/netdata" "$pkgdir/etc/logrotate.d/netdata"
2017-12-18 13:26:20 +00:00
install -Dm0644 "${srcdir}/${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
2023-08-13 22:06:11 +00:00
# https://github.com/netdata/netdata/tree/master/collectors/apps.plugin#permissions
setcap cap_dac_read_search,cap_sys_ptrace+ep "${pkgdir}"/usr/lib/netdata/plugins.d/apps.plugin
setcap cap_dac_read_search,cap_sys_ptrace+ep "${pkgdir}"/usr/lib/netdata/plugins.d/debugfs.plugin
2023-08-16 17:46:38 +00:00
setcap cap_dac_read_search,cap_sys_ptrace+ep "${pkgdir}"/usr/lib/netdata/plugins.d/perf.plugin
2017-03-26 21:34:52 +00:00
}