wok-6.x annotate nagios-nrpe/receipt @ rev 21297

updated libshout and libshout-dev (2.2.1 -> 2.4.1)
author Hans-G?nter Theisgen
date Wed Apr 17 16:47:19 2019 +0100 (2019-04-17)
parents 8c314507df00
children 0fda98eeae85
rev   line source
erjo@8331 1 # SliTaz package receipt.
erjo@8331 2
erjo@8331 3 PACKAGE="nagios-nrpe"
erjo@14457 4 VERSION="2.14"
erjo@8331 5 CATEGORY="network"
erjo@8331 6 SHORT_DESC="Service and network monitoring program, remote monitoring."
erjo@8331 7 MAINTAINER="erjo@slitaz.org"
pascal@15584 8 LICENSE="GPL2"
erjo@8331 9 SOURCE="nrpe"
erjo@8331 10 TARBALL="$SOURCE-$VERSION.tar.gz"
pascal@20669 11 WEB_SITE="https://www.nagios.org/"
erjo@8331 12 WGET_URL="$SF_MIRROR/nagios/$TARBALL"
pascal@15584 13
pascal@8938 14 BUILD_DEPENDS="libcrypto-dev openssl-dev openssl libwrap-dev"
erjo@8331 15 DEPENDS="nagios-plugins libssl libcrypto"
erjo@8331 16
erjo@8331 17 # Rules to configure and make the package.
erjo@8331 18 compile_rules()
erjo@8331 19 {
pascal@20407 20 while read patch_file; do
erjo@8331 21 if [ ! -f done.$patch_file ]; then
slaxemulator@9700 22 patch -p1 < $stuff/$patch_file || return 1
erjo@8331 23 touch done.$patch_file
erjo@8331 24 fi
erjo@8331 25 done <<EOT
erjo@8331 26 $PACKAGE-$VERSION-Makefile.u
erjo@8331 27 EOT
erjo@8331 28 ./configure --prefix=/usr --infodir=/usr/share/info \
erjo@8331 29 --localstatedir=/var \
erjo@8331 30 --datadir=/usr/share/nagios \
erjo@8331 31 --sysconfdir=/etc/nagios \
erjo@8331 32 --sbindir=/usr/lib/nagios \
erjo@8331 33 --bindir=/usr/bin \
erjo@8331 34 --libexecdir=/usr/lib/nagios/plugins \
pascal@20407 35 --enable-ssl \
erjo@8331 36 --with-nagios-user=nagios \
erjo@8331 37 --with-nagios-group=nagios \
erjo@8331 38 --with-nrpe-user=nagios \
erjo@8331 39 --with-nrpe-group=nagios \
erjo@8331 40 --mandir=/usr/share/man $CONFIGURE_ARGS &&
erjo@8331 41 make all &&
erjo@14457 42 make install
erjo@8331 43 }
erjo@8331 44
erjo@8331 45 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@8331 46 genpkg_rules()
erjo@8331 47 {
erjo@8331 48 mkdir -p $fs/etc/nagios/objects \
pascal@16681 49 $fs/etc/init.d
erjo@8331 50
erjo@14457 51 cp -a $install/usr $fs
erjo@8331 52 install -m 0644 $src/sample-config/nrpe.cfg $fs/etc/nagios
erjo@8331 53 sed -i 's|/var/run|/var/run/nagios|' $fs/etc/nagios/nrpe.cfg
erjo@8331 54
erjo@8331 55 # Install config file nd init script
erjo@14457 56 install -o root -g root -m 644 $stuff/nrpe.cfg $fs/etc/nagios/objects
erjo@14457 57 install -o root -g root -m 755 $stuff/nrpe $fs/etc/init.d
erjo@8331 58 }
erjo@8331 59
erjo@8331 60 post_install()
erjo@8331 61 {
pascal@18730 62 if ! grep -q nagios "$1/etc/passwd"; then
pascal@20319 63 echo
erjo@8331 64 echo -n "Adding user nagios..."
pascal@18730 65 chroot "$1/" adduser -S -D -H nagios
erjo@8331 66 status
erjo@8331 67 fi
erjo@8331 68
erjo@8331 69 # Set perms for files and directories
pascal@18730 70 chroot "$1/" chown -R nagios.nagios /usr/lib/nagios/plugins
pascal@18730 71 chroot "$1/" chown nagios.nagios /etc/nagios/*
erjo@8331 72
erjo@8331 73 # Add check_nrpe in nagios config file
pascal@18730 74 echo "cfg_file=/etc/nagios/objects/nrpe.cfg" >> "$1/etc/nagios/nagios.cfg"
erjo@8331 75 }
erjo@8331 76
erjo@8331 77 post_remove()
erjo@8331 78 {
pascal@18730 79 [ -f "$1/etc/nagios/nagios.cfg" ] && sed -i 's/.*nrpe.cfg//' "$1/etc/nagios/nagios.cfg"
erjo@8331 80 }