wok-next view nagios-nrpe/receipt @ rev 20513

A lot of tiny edits; remove wget and pkg-build from $BUILD_DEPENDS and from *-dev packages $DEPENDS.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Mar 21 15:58:17 2018 +0200 (2018-03-21)
parents e6615350078d
children 757d032c55c7
line source
1 # SliTaz package receipt v2.
3 PACKAGE="nagios-nrpe"
4 VERSION="2.14"
5 CATEGORY="network"
6 SHORT_DESC="Service and network monitoring program, remote monitoring"
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://www.nagios.org/"
11 TARBALL="nrpe-$VERSION.tar.gz"
12 WGET_URL="$SF_MIRROR/nagios/$TARBALL"
14 BUILD_DEPENDS="openssl-dev openssl libwrap-dev"
16 compile_rules() {
17 ./configure \
18 --prefix=/usr \
19 --infodir=/usr/share/info \
20 --localstatedir=/var \
21 --datadir=/usr/share/nagios \
22 --sysconfdir=/etc/nagios \
23 --sbindir=/usr/lib/nagios \
24 --bindir=/usr/bin \
25 --libexecdir=/usr/lib/nagios/plugins \
26 --with-nagios-user=nagios \
27 --with-nagios-group=nagios \
28 --with-nrpe-user=nagios \
29 --with-nrpe-group=nagios \
30 --mandir=/usr/share/man \
31 $CONFIGURE_ARGS &&
32 make all &&
33 make install || return 1
35 # Install config file nd init script
36 install -Dm644 $stuff/nrpe.cfg $install/etc/nagios/objects/nrpe.cfg
37 install -Dm755 $stuff/nrpe $install/etc/init.d/nrpe
39 install -Dm644 $src/sample-config/nrpe.cfg $install/etc/nagios/nrpe.cfg
40 sed -i 's|/var/run|/var/run/nagios|' $install/etc/nagios/nrpe.cfg
41 }
43 genpkg_rules() {
44 copy @std
45 DEPENDS="nagios-plugins openssl"
46 }
48 post_install() {
49 if ! grep -q nagios "$1/etc/passwd"; then
50 chroot "$1/" adduser -S -D -H nagios
51 fi
53 # Set perms for files and directories
54 chroot "$1/" chown -R nagios.nagios /usr/lib/nagios/plugins
55 chroot "$1/" chown nagios.nagios /etc/nagios/*
57 # Add check_nrpe in nagios config file
58 echo "cfg_file=/etc/nagios/objects/nrpe.cfg" >> "$1/etc/nagios/nagios.cfg"
59 }
61 post_remove() {
62 [ -f "$1/etc/nagios/nagios.cfg" ] &&
63 sed -i 's/.*nrpe.cfg//' "$1/etc/nagios/nagios.cfg"
64 }