wok-6.x annotate nagios-plugins/receipt @ rev 23306

updated perl-curses (1.24 -> 1.36)
author Hans-G?nter Theisgen
date Sun Mar 29 17:39:10 2020 +0100 (2020-03-29)
parents 39e11db3ea78
children a3c45ab9082e
rev   line source
erjo@8333 1 # SliTaz package receipt.
erjo@8333 2
erjo@8333 3 PACKAGE="nagios-plugins"
Hans-G?nter@23213 4 VERSION="2.3.3"
erjo@8333 5 CATEGORY="network"
Hans-G?nter@21512 6 SHORT_DESC="Plugins for host, service and network monitoring program nagios."
erjo@8333 7 MAINTAINER="erjo@slitaz.org"
pascal@14999 8 LICENSE="GPL3"
Hans-G?nter@21512 9 WEB_SITE="https://www.nagios-plugins.org/"
Hans-G?nter@21512 10
erjo@8333 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
Hans-G?nter@21513 12 WGET_URL="https://www.nagios-plugins.org/download/$TARBALL"
pascal@14999 13
pascal@23256 14 DEPENDS="fping libssl procps"
Hans-G?nter@21512 15 BUILD_DEPENDS="libmysqlclient mysql-dev openldap-dev openssl-dev \
pascal@23256 16 radiusclient-ng radiusclient-ng-dev procps"
erjo@8333 17
erjo@8333 18 # Rules to configure and make the package.
erjo@8333 19 compile_rules()
erjo@8333 20 {
Hans-G?nter@21512 21 ./configure \
Hans-G?nter@21512 22 --prefix=/usr \
Hans-G?nter@21512 23 --libexecdir=/usr/lib/nagios/plugins \
Hans-G?nter@21512 24 --with-nagios-user=nobody \
Hans-G?nter@21512 25 --with-nagios-group=nogroup \
Hans-G?nter@21512 26 --with-ping-command="/bin/ping -w %d -c %d %s" \
Hans-G?nter@21512 27 --with-fping-command="/usr/sbin/fping" \
Hans-G?nter@21512 28 --mandir=/usr/share/man \
Hans-G?nter@23213 29 $CONFIGURE_ARGS &&
pascal@15265 30 make &&
pascal@14999 31 make DESTDIR=$DESTDIR install &&
pascal@14999 32 make DESTDIR=$DESTDIR install-root
erjo@8333 33 }
erjo@8333 34
erjo@8333 35 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@8333 36 genpkg_rules()
erjo@8333 37 {
Hans-G?nter@21512 38 mkdir -p $fs/usr/lib
Hans-G?nter@21512 39 mkdir -p $fs/etc/nagios/objects
Hans-G?nter@21512 40
Hans-G?nter@23213 41 cp -a $install/usr/lib/nagios $fs/usr/lib
erjo@8333 42
erjo@8333 43 #
erjo@8333 44 stuff/convertcfg $src/command.cfg commands > $fs/etc/nagios/objects/command.cfg
erjo@8333 45
Hans-G?nter@21512 46 # Move mySQL plugins in a separate package.
Hans-G?nter@23213 47 rm -f $fs/usr/lib/nagios/plugins/*mysql*
erjo@8333 48 }
erjo@8333 49
erjo@8333 50 post_install()
erjo@8333 51 {
Hans-G?nter@23213 52 if ! grep -q nagios "$1/etc/passwd"
Hans-G?nter@23213 53 then
pascal@20319 54 echo
erjo@8333 55 echo -n "Adding user/group nagios..."
pascal@18730 56 chroot "$1/" addgroup -S nagios
pascal@18730 57 chroot "$1/" adduser -S -D -H -G nagios nagios
erjo@8333 58 status
erjo@8333 59 fi
erjo@8333 60
Hans-G?nter@23213 61 if [ -f "$1/etc/nagios/resource.cfg" ]
Hans-G?nter@23213 62 then
erjo@8333 63 sed -i 's|/usr/lib/nagios|/usr/lib/nagios/plugins|' \
pascal@18730 64 "$1/etc/nagios/resource.cfg"
erjo@8333 65 fi
Hans-G?nter@21512 66
Hans-G?nter@21512 67 # Set permissions for files and directories
Hans-G?nter@23213 68 chroot "$1/" chown -R nagios.nagios /usr/lib/nagios/plugins
Hans-G?nter@23213 69 chroot "$1/" chown -R nagios.nagios /etc/nagios/objects
erjo@8333 70 }