aboutsummaryrefslogtreecommitdiffstats
path: root/main/nrpe/APKBUILD
blob: 232cc779abf367a3a50bf94c49af8d91b32eddb6 (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
# Maintainer: Jeff Bilyk <jbilyk@gmail.com> 
pkgname=nrpe
pkgver=2.15
pkgrel=2
pkgusers="nagios"
pkggroups="nagios"
pkgdesc="NRPE allows you to remotely execute Nagios plugins on other Linux/Unix machines."
url="http://www.nagios.org/download/addons"
arch="all"
license="GPL"
depends=""
makedepends="openssl-dev perl"
install="nrpe.pre-install"
subpackages="$pkgname-plugin"
source="http://downloads.sourceforge.net/nagios/$pkgname-$pkgver.tar.gz
	nrpe.initd
	nrpe.confd"

_builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$_builddir"
	update_config_sub || return 1
}

build() {
	cd "$_builddir"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--libexecdir=/usr/lib/nagios/plugins \
		--enable-command-args \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install install-daemon-config
	#remove plugin since its in separate package
	rm -rf "$pkgdir"/usr/lib
	install -Dm755 "$srcdir"/nrpe.initd "$pkgdir"/etc/init.d/nrpe
	install -Dm644 "$srcdir"/nrpe.confd "$pkgdir"/etc/conf.d/nrpe
}

plugin() {
	pkgdesc="Nagios plugin to check result via NRPE daemon"
	cd "$_builddir"
	make DESTDIR="$subpkgdir" install-plugin
}

md5sums="3921ddc598312983f604541784b35a50  nrpe-2.15.tar.gz
ca97858cb1995111ebf69b9a2cbb6ccb  nrpe.initd
6bd25a1ace9e108c5014a83adcad15b3  nrpe.confd"
sha256sums="66383b7d367de25ba031d37762d83e2b55de010c573009c6f58270b137131072  nrpe-2.15.tar.gz
42d93743669764cc30dca8773578bbdb6bf4376a22c1f654cf76c8e19b8e4df4  nrpe.initd
c07c0eef454515c622bb0c12846ad73e961193cacd7c46cf70e49e09605e6f08  nrpe.confd"
sha512sums="03ce9774b5112d03235dc9da075770d89d1bcc5ffa5faf221ff7ea8ec5c92ded1e1ae9222581a87cf53736d190ac047e1acce7edc2f31f26c432d786cdef0e73  nrpe-2.15.tar.gz
7e8ed9170b20cc1e33caacc7e007bd4eef17aa100a24802f67d4c06870d3228b68da4661c75dbe0a74711efe0c9155111c380bcd80a352fe0e198aaa6ccbaa2e  nrpe.initd
1070f3aaae560c2b2ee5195eb23787504864a8b6e1a92181158269d30e525733136482c7d299a71bbd44f575d2c919935adf9c162be6cd4fa99bbad06b9c3b0c  nrpe.confd"