aboutsummaryrefslogtreecommitdiffstats
path: root/main/nrpe/APKBUILD
blob: da004c910de56731b1d9095f5fc6d2bebbbf7607 (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
# Maintainer: Jeff Bilyk <jbilyk@gmail.com>
pkgname=nrpe
pkgver=3.2.1
pkgrel=1
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"
makedepends="openssl-dev autoconf"
install="nrpe.pre-install"
subpackages="$pkgname-plugin"
source="https://downloads.sourceforge.net/nagios/$pkgname-$pkgver.tar.gz
	sample-config.patch
	nrpe.initd
	nrpe.confd"
builddir="$srcdir/$pkgname-$pkgver"
options="!check" # needs services to run

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 \
		--localstatedir=/var \
		--with-need-dh=no \
		--with-init-type=openrc \
		--enable-command-args
	make all
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install install-daemon install-config

	rm "$pkgdir"/usr/bin/nrpe-uninstall

	# 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
}

sha512sums="ec6ff42a00bd97ed80010a82e26dc35fd419f2feda65820cda0108068173c1ae44eee698833a50fd2079429a6f5eb1321c4f06b09c6708bc5fbe48f176389856  nrpe-3.2.1.tar.gz
5949a019a9e699559c66d506029e8c7a2daa298dfd254cab3d8049eec59ccec03efe5a5f32190fbc1f3fdc884cd204636f0eb445793758886d199efae46ef1ce  sample-config.patch
b2f23bab97384ef8f1760c79d0cbadb4e81d4bb8134887a38662033a7f0c30480222b9ecb78c3ae276bd8b35470b3db316143f591baa2c535f5fb26c34ad2824  nrpe.initd
05a0f1f5f75345370cae3262f9988d537e24dfcbb6c14a1ff3486193625481045d0844c035f7be491e74ca9ad45ed0fae7b7005616936cc274cd7e8a851c8628  nrpe.confd"