wok annotate nagios-plugins/receipt @ rev 20669

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