aboutsummaryrefslogtreecommitdiffstats
path: root/community/munin/APKBUILD
blob: ffd9970223203ba6b65864173c0066a42f9120c1 (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
# Contributor: Sergei Lukin <sergej.lukin@gmail.com>
# Contributor: Stefan Wagner <stw@bit-strickerei.de>
# Maintainer: Stefan Wagner <stw@bit-strickerei.de>
pkgname=munin
pkgver=2.0.49
pkgrel=0
pkgdesc="A distributed monitoring/graphing tool"
url="http://munin-monitoring.org/"
arch="noarch"
license="GPL-2.0-only"
_perl_modules="perl-rrd perl-net-snmp perl-log-log4perl perl-html-template
	perl-net-ssleay perl-net-server perl-date-manip perl-io-socket-inet6
	perl-file-copy-recursive perl-fcgi perl-uri"
depends="$pkgname-node"
makedepends="bash rrdtool perl-dev perl-module-build $_perl_modules"
pkgusers=munin
pkggroups=munin
subpackages="$pkgname-node"
source="http://downloads.munin-monitoring.org/munin/stable/$pkgver/munin-$pkgver.tar.gz
	munin-config.patch
	fix-build.patch
	$pkgname.crond
	$pkgname-node.initd
	$pkgname.logrotate
	$pkgname-node.logrotate"

build() {
	make -j1
}

package() {
	make DESTDIR="$pkgdir" install-master-prime
	rm -rf "$pkgdir"/usr/share/man

	install -m644 -D "$srcdir"/$pkgname.crond \
		"$pkgdir"/etc/munin/munin.cron.sample
	install -m644 -D "$srcdir"/$pkgname.logrotate \
		"$pkgdir"/etc/logrotate.d/$pkgname

	install -d -o $pkgusers -g $pkggroups "$pkgdir"/usr/share/webapps/munin/html
}

node() {
	depends="bash rrdtool perl $_perl_modules"
	install="$subpkgname.pre-install"

	cd "$builddir"

	mkdir -p "$subpkgdir"
	make DESTDIR="$subpkgdir" install-common-prime install-node-prime \
		install-plugins-prime
	rm -rf "$subpkgdir"/usr/share/man

	install -m644 -D "$srcdir"/$subpkgname.logrotate \
		"$pkgdir"/etc/logrotate.d/$subpkgname
	install -m755 -D "$srcdir"/$subpkgname.initd \
		"$subpkgdir"/etc/init.d/$subpkgname
}

sha512sums="20f1f27aa1ff39ed92c967a13581ae199930323f5d2b62b62ce0a548a4cf561595e85d069e836b156c05d4a94c66328009aba56cb1b06c4b2719fbd9e1061ca4  munin-2.0.49.tar.gz
d39760b9c0546638feaf164ad132a0f384f1b70872de2251a328a27a64797501f926141a7273cd5e41a8c11ec4d7a4adda1863b02439d9caa8b216fac60d3062  munin-config.patch
06061feb63a451fe45ea4271dac3d0b0f4758f877df9b0d734cc6057eadfec26765b65fd91d3a00febb66ac79c70c9468cc1548e39362adfc19809900aaf8aa9  fix-build.patch
194b742b2ff8312c4c42a8a77d1d9a80bc53ced2343248c36f4229b0b0d366e898487fb5e415f1f5ccea7210a7a86e25de5e45193dbb5d26d2d6a195f0597642  munin.crond
ee055a2bcb0ee3895190ac28b9474a50896e9c6d8f88bb93bc00fd802f313c00bc92fcbb46e22c545fb1c111d63398725c09a8bf7adc8a8977e1832b19f61044  munin-node.initd
0f4768033f63103cb41b3f3869ebe378098f85409a909afa311a49587cb6afcffe2b2199821cd41a08f41bbeba3d37121561406978960e3345fbccfd230040e6  munin.logrotate
34cdc04e83067d2fc839efaf06d96da892d76b77555a4b7b633f9a88fb86dc5f4413fe7a4f6c540e95724b23e8a4ad0ff37f521d44046bfcf18cb0428b94e6e2  munin-node.logrotate"