summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 59a6732361b96d8872e248080554ea2f8d2423a5 (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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# Maintainer: Chris Hobbs (RX14) <chris@rx14.co.uk>
# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: SanskritFritz (gmail)

pkgname=netdata-git
_gitname=netdata
pkgver=v1.9.0.r709.g8476fa89
pkgrel=1
pkgdesc="Real-time performance monitoring, in the greatest possible detail, over the web"
url="https://github.com/firehol/netdata/wiki"
arch=('x86_64')
license=('GPL')
depends=('libmnl' 'libnetfilter_acct' 'zlib')
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'
            'python-requests: for monitoring elasticsearch'
            'hddtemp: for monitoring hhd temperature'
            'apcupsd: for monitoring APC UPS'
            'iw: for monitoring Linux as access point')
source=("$_gitname::git+https://github.com/firehol/netdata"
        "${_gitname}.tmpfiles"
        "${_gitname}.sysusers")
provides=('netdata')
conflicts=('netdata')
install="$_gitname.install"
sha512sums=('SKIP'
            '3f934ddd1f5248f9e11c29050c023d60b76e4098ec9c8d413bb362d43e9242f767fd58310d966076e8400779af8bda2459afcc314b267fcb9f1c84173e14e313'
            'a910809a823ba58ca7bdaa72e8d68427b48f452c1fbb2343fa182ecb0a091a7640e73af24b8ba2fdd90e00aed8ef53b7fccd25cb8f04ca9b9fa6c8e52223ca66')

pkgver() {
  cd "$_gitname"
  git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$_gitname"

  ./autogen.sh
  ./configure \
    --prefix="/usr" \
    --sbindir="/usr/bin" \
    --sysconfdir="/etc" \
    --libexecdir="/usr/lib" \
    --localstatedir="/var" \
    --with-zlib --with-math --with-user=netdata
  make
}

package() {
  cd "$_gitname"

  make DESTDIR="$pkgdir" install

  # Remove /var/*, pacman creates it via tmpfiles hook
  rm -vrf "${pkgdir}/var"
  touch "$pkgdir/etc/netdata/netdata.conf"
  chown -R 134:134 "$pkgdir"/etc/netdata
  chown -R 134:134 "$pkgdir"/usr/share/netdata/web

  install -Dm0644 "system/netdata.service" "$pkgdir/usr/lib/systemd/system/netdata.service"
  install -Dm0644 "system/netdata.logrotate" "$pkgdir/etc/logrotate.d/netdata"
  install -Dm0644 "${srcdir}/${_gitname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${_gitname}.conf"
  install -Dm0644 "${srcdir}/${_gitname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${_gitname}.conf"
}

backup=(
  etc/netdata/charts.d/apache.conf
  etc/netdata/charts.d/apcupsd.conf
  etc/netdata/charts.d/cpufreq.conf
  etc/netdata/charts.d/exim.conf
  etc/netdata/charts.d/libreswan.conf
  etc/netdata/charts.d/load_average.conf
  etc/netdata/charts.d/mysql.conf
  etc/netdata/charts.d/nut.conf
  etc/netdata/charts.d/phpfpm.conf
  etc/netdata/charts.d/sensors.conf
  etc/netdata/charts.d/tomcat.conf
  etc/netdata/charts.d/ap.conf
  etc/netdata/charts.d/cpu_apps.conf
  etc/netdata/charts.d/example.conf
  etc/netdata/charts.d/hddtemp.conf
  etc/netdata/charts.d/mem_apps.conf
  etc/netdata/charts.d/nginx.conf
  etc/netdata/charts.d/opensips.conf
  etc/netdata/charts.d/postfix.conf
  etc/netdata/charts.d/squid.conf
  etc/netdata/health.d/apache.conf
  etc/netdata/health.d/backend.conf
  etc/netdata/health.d/beanstalkd.conf
  etc/netdata/health.d/bind_rndc.conf
  etc/netdata/health.d/btrfs.conf
  etc/netdata/health.d/ceph.conf
  etc/netdata/health.d/cpu.conf
  etc/netdata/health.d/couchdb.conf
  etc/netdata/health.d/disks.conf
  etc/netdata/health.d/elasticsearch.conf
  etc/netdata/health.d/entropy.conf
  etc/netdata/health.d/fping.conf
  etc/netdata/health.d/fronius.conf
  etc/netdata/health.d/haproxy.conf
  etc/netdata/health.d/httpcheck.conf
  etc/netdata/health.d/ipc.conf
  etc/netdata/health.d/ipfs.conf
  etc/netdata/health.d/ipmi.conf
  etc/netdata/health.d/isc_dhcpd.conf
  etc/netdata/health.d/lighttpd.conf
  etc/netdata/health.d/mdstat.conf
  etc/netdata/health.d/memcached.conf
  etc/netdata/health.d/memory.conf
  etc/netdata/health.d/mongodb.conf
  etc/netdata/health.d/mysql.conf
  etc/netdata/health.d/named.conf
  etc/netdata/health.d/net.conf
  etc/netdata/health.d/netfilter.conf
  etc/netdata/health.d/nginx.conf
  etc/netdata/health.d/nginx_plus.conf
  etc/netdata/health.d/portcheck.conf
  etc/netdata/health.d/postgres.conf
  etc/netdata/health.d/qos.conf
  etc/netdata/health.d/ram.conf
  etc/netdata/health.d/redis.conf
  etc/netdata/health.d/retroshare.conf
  etc/netdata/health.d/softnet.conf
  etc/netdata/health.d/squid.conf
  etc/netdata/health.d/stiebeleltron.conf
  etc/netdata/health.d/swap.conf
  etc/netdata/health.d/tcp_conn.conf
  etc/netdata/health.d/tcp_listen.conf
  etc/netdata/health.d/tcp_mem.conf
  etc/netdata/health.d/tcp_orphans.conf
  etc/netdata/health.d/tcp_resets.conf
  etc/netdata/health.d/udp_errors.conf
  etc/netdata/health.d/varnish.conf
  etc/netdata/health.d/web_log.conf
  etc/netdata/health.d/zfs.conf
  etc/netdata/apps_groups.conf
  etc/netdata/charts.d.conf
  etc/netdata/python.d/apache.conf
  etc/netdata/python.d/beanstalk.conf
  etc/netdata/python.d/bind_rndc.conf
  etc/netdata/python.d/ceph.conf
  etc/netdata/python.d/chrony.conf
  etc/netdata/python.d/couchdb.conf
  etc/netdata/python.d/cpufreq.conf
  etc/netdata/python.d/dns_query_time.conf
  etc/netdata/python.d/dnsdist.conf
  etc/netdata/python.d/dovecot.conf
  etc/netdata/python.d/elasticsearch.conf
  etc/netdata/python.d/example.conf
  etc/netdata/python.d/exim.conf
  etc/netdata/python.d/fail2ban.conf
  etc/netdata/python.d/freeradius.conf
  etc/netdata/python.d/go_expvar.conf
  etc/netdata/python.d/haproxy.conf
  etc/netdata/python.d/hddtemp.conf
  etc/netdata/python.d/httpcheck.conf
  etc/netdata/python.d/icecast.conf
  etc/netdata/python.d/ipfs.conf
  etc/netdata/python.d/isc_dhcpd.conf
  etc/netdata/python.d/mdstat.conf
  etc/netdata/python.d/memcached.conf
  etc/netdata/python.d/mongodb.conf
  etc/netdata/python.d/mysql.conf
  etc/netdata/python.d/nginx.conf
  etc/netdata/python.d/nginx_plus.conf
  etc/netdata/python.d/nsd.conf
  etc/netdata/python.d/ntpd.conf
  etc/netdata/python.d/ovpn_status_log.conf
  etc/netdata/python.d/phpfpm.conf
  etc/netdata/python.d/portcheck.conf
  etc/netdata/python.d/postfix.conf
  etc/netdata/python.d/postgres.conf
  etc/netdata/python.d/powerdns.conf
  etc/netdata/python.d/rabbitmq.conf
  etc/netdata/python.d/redis.conf
  etc/netdata/python.d/retroshare.conf
  etc/netdata/python.d/samba.conf
  etc/netdata/python.d/sensors.conf
  etc/netdata/python.d/springboot.conf
  etc/netdata/python.d/squid.conf
  etc/netdata/python.d/smartd_log.conf
  etc/netdata/python.d/tomcat.conf
  etc/netdata/python.d/traefik.conf
  etc/netdata/python.d/varnish.conf
  etc/netdata/python.d/web_log.conf
  etc/netdata/fping.conf
  etc/netdata/node.d.conf
  etc/netdata/python.d.conf
  etc/netdata/health_alarm_notify.conf
  etc/netdata/health_email_recipients.conf
  etc/netdata/stream.conf
  etc/netdata/statsd.d/example.conf
  etc/netdata/netdata.conf
)