aboutsummaryrefslogtreecommitdiffstats
path: root/main/nagios-plugins/APKBUILD
blob: efc47fdff08015208aa472f7f12c90596046ea56 (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
# Maintainer: Jeff Bilyk <jbilyk@gmail.com>
pkgname=nagios-plugins
pkgver=1.4.15
pkgrel=6
pkgdesc="Plugins for Nagios to check services on hosts"
url="http://nagiosplugins.org"
arch="all"
license="GPL-2"
depends="nagios fping net-snmp-tools bind-tools nrpe-plugin perl-net-snmp"
makedepends="net-snmp-tools openssl-dev openldap-dev mysql-dev postgresql-dev libpq"
source="http://downloads.sourceforge.net/nagiosplug/$pkgname-$pkgver.tar.gz"
pkgusers="nagios"
pkggroups="nagios"
subpackages="$pkgname-contrib"

build() {
	cd "$srcdir/$pkgname-$pkgver"

	./configure --prefix=/usr \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--bindir=/usr/sbin \
		--libexecdir=/usr/lib/nagios/plugins \
		--localstatedir=/var/nagios \
		--with-ps-command="/bin/ps" \
		--with-ps-format="%d %s %s %s" \
		--with-ps-varlist="&procpid,&procuid,&procpcpu,procprog" \
		--with-ps-cols=4 \
		--with-ping-command="/bin/ping -c %d %s"
	make all || return 1
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
	make DESTDIR="$pkgdir" install
}

contrib() {
	pkgdesc="Contrib Plugins for Nagios"
	cd "$pkgdir"
	mkdir -p ${pkgdir}-contrib
	cd ${pkgdir}-contrib
	mkdir -p "${pkgdir}"-contrib/usr/lib/nagios/plugins/
	cp "$srcdir"/$pkgname-$pkgver/contrib/*.sh "${pkgdir}"-contrib/usr/lib/nagios/plugins/
	cp "$srcdir"/$pkgname-$pkgver/contrib/*.pl "${pkgdir}"-contrib/usr/lib/nagios/plugins/
	cp "$srcdir"/$pkgname-$pkgver/contrib/*.pm "${pkgdir}"-contrib/usr/lib/nagios/plugins/
	cp "$srcdir"/$pkgname-$pkgver/contrib/*.py "${pkgdir}"-contrib/usr/lib/nagios/plugins/
	chmod a+x "${pkgdir}"-contrib/usr/lib/nagios/plugins/*.sh
	chmod a+x "${pkgdir}"-contrib/usr/lib/nagios/plugins/*.pl
	chmod a+x "${pkgdir}"-contrib/usr/lib/nagios/plugins/*.pm
	chmod a+x "${pkgdir}"-contrib/usr/lib/nagios/plugins/*.py
}
	

md5sums="56abd6ade8aa860b38c4ca4a6ac5ab0d  nagios-plugins-1.4.15.tar.gz"