summaryrefslogtreecommitdiff
path: root/collectd/PKGBUILD
blob: 9994372da1cbc101da8a3c66e27082c0d32f93ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Maintainer: Erich Eckner <arch at eckner dot net>
# Contributor: lilydjwg <lilydjwg@gmail.com>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Gerhard Brauer <gerhard.brauer@web.de>

pkgname=collectd
pkgver=5.12.0
pkgrel=38
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=(
  'gcc-libs=13.2.1'
  'glibc>=2.36'
  'iptables=1:1.8.10'
  '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.3'
  'libgdk_pixbuf-2.0.so=0'
  'libgio-2.0.so=0'
  'libglib-2.0.so=0'
  'libgobject-2.0.so=0'
  'libgpg-error=1.48'
  'libldap=2.6.7'
  'libmariadb.so=3'
  'libmemcached-awesome=1.1.4'
  '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'
  'libssl.so=3'
  'libudev.so=1'
  'libvirt.so=0'
  'libxml2.so=2'
  'libyajl.so=2'
  'mosquitto=2.0.18'
  'net-snmp=5.9.4'
  'nut=2.8.1'
  'openipmi=2.0.34'
  '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
}