# Maintainer: Erich Eckner # Contributor: lilydjwg # Contributor: Gaetan Bisson # Contributor: Gerhard Brauer pkgname=collectd pkgver=5.12.0 pkgrel=14 pkgdesc='Daemon which collects system performance statistics periodically' url='https://collectd.org/' arch=('i486' 'i686' 'pentium4' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64') license=('GPL') optdepends=('curl: apache, ascent, curl, nginx, and write_http plugins' 'libdbi: dbi plugin' 'libesmtp: notify_email plugin' 'libgcrypt: encryption and authentication for network plugin' 'libmemcached: memcachec plugin' 'mariadb-libs: mysql plugin' 'systemd-libs: UdevNameAttr option' 'iproute2: netlink plugin' 'net-snmp: snmp plugin' 'libnotify: notify_desktop plugin' 'openipmi: ipmi plugin' 'liboping: ping plugin' 'libpcap: dns plugin' 'perl: perl plugin' 'postgresql-libs: postgresql plugin' 'python: python plugin' 'rrdtool: rrdtool and rrdcached plugins' 'lm_sensors: lm_sensors and sensors plugins' 'libvirt: libvirt plugin' 'libxml2: ascent and libvirt plugins' 'yajl: curl_json plugin' 'libatasmart: smart plugin' 'lvm2: lvm plugin' 'protobuf-c: write_riemann plugin' 'mosquitto: MQTT plugin' 'libmicrohttpd: prometheus plugin' 'librabbitmq-c: amqp plugin' 'nut: nut plugin') makedepends=(${optdepends[@]%:*}) _pinned_dependencies=( 'glibc>=2.36' 'iptables=1:1.8.8' 'jansson=2.14' 'libatasmart=0.19' 'libcap.so=2' 'libcrypto.so=3' 'libcrypt.so=2' 'libcurl.so=4' 'libdbi=0.9.0' 'libesmtp=1.1.0' 'libgcrypt=1.10.1' 'libgdk_pixbuf-2.0.so=0' 'libgio-2.0.so=0' 'libglib-2.0.so=0' 'libgobject-2.0.so=0' 'libgpg-error=1.46' 'libldap=2.6.3' 'libmariadb.so=3' 'libmemcached-awesome=1.1.3' 'libmicrohttpd.so=12' 'libmnl=1.0.5' 'libnotify.so=4' 'liboping.so=0' 'libpcap.so=1' 'libpq.so=5' 'libprotobuf-c.so=1' 'librabbitmq-c=0.11.0' 'libsensors.so=5' 'libudev.so=1' 'libvirt.so=0' 'libxml2.so=2' 'libyajl.so=2' 'mosquitto=2.0.15' 'net-snmp=5.9.1' 'nut=2.8.0' 'openipmi=2.0.33' 'rrdtool=1.8.0' ) depends=("${_pinned_dependencies[@]}" 'libltdl' 'iptables' 'libnsl') source=("https://storage.googleapis.com/collectd-tarballs/${pkgname}-${pkgver}.tar.bz2" 'service') sha256sums=('5bae043042c19c31f77eb8464e56a01a5454e0b39fa07cf7ad0f1bfc9c3a09d6' '83957b0b2cc7fa05a4d5f22e6c913ae2b0a4d7821f7b4e2d2e763054cc8c6c21') backup=('etc/collectd.conf') prepare() { cd ${pkgname}-${pkgver} sed -i '/sys\/mount.h/d' src/utils/mount/mount.h } build() { cd ${pkgname}-${pkgver} ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --sbindir=/usr/bin \ --disable-werror \ --with-python=/usr/bin/python \ --with-perl-bindings='INSTALLDIRS=vendor' \ make all } package() { cd ${pkgname}-${pkgver} make DESTDIR="${pkgdir}" install rmdir "${pkgdir}/var/run" # FS#30201 install -Dm644 ../service "${pkgdir}"/usr/lib/systemd/system/collectd.service install -Dm644 contrib/collectd2html.pl "${pkgdir}"/usr/share/collectd/collectd2html.pl }