wok-6.x view nagios-plugins/receipt @ rev 23947

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