wok-current view nagios-plugins/receipt @ rev 25280
updated rinetd (0.62 -> 0.73)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Jul 18 15:13:04 2022 +0100 (2022-07-18) |
parents | 08e0172a1a69 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="nagios-plugins"
4 VERSION="2.4.0"
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://github.com/$PACKAGE/$PACKAGE/archive/refs/tags/release-$VERSION.tar.gz"
14 SUGGESTED="nagios-plugins-lang"
15 DEPENDS="fping libssl procps"
16 BUILD_DEPENDS="automake file libmysqlclient mysql-dev openldap-dev openssl-dev
17 procps radiusclient-ng radiusclient-ng-dev"
19 current_version()
20 {
21 wget -O - $(dirname $WGET_URL) 2>/dev/null | \
22 sed "/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 ./tools/setup &&
29 ./configure \
30 --prefix=/usr \
31 --libexecdir=/usr/lib/nagios/plugins \
32 --with-nagios-user=nobody \
33 --with-nagios-group=nogroup \
34 --with-ping-command="/bin/ping -w %d -c %d %s" \
35 --with-fping-command="/usr/sbin/fping" \
36 --mandir=/usr/share/man \
37 $CONFIGURE_ARGS &&
38 patch --strip=0 --input=$stuff/patches/check_load.c-2.4.0 &&
39 make &&
40 make install DESTDIR=$DESTDIR &&
41 make install-root DESTDIR=$DESTDIR
42 }
44 # Rules to gen a SliTaz package suitable for Tazpkg.
45 genpkg_rules()
46 {
47 mkdir -p $fs/usr/lib
48 mkdir -p $fs/etc/nagios/objects
50 cp -a $install/usr/lib/nagios $fs/usr/lib
52 #
53 stuff/convertcfg $src/command.cfg commands > $fs/etc/nagios/objects/command.cfg
55 # Move mySQL plugins in a separate package.
56 rm -f $fs/usr/lib/nagios/plugins/*mysql*
57 }
59 post_install()
60 {
61 if ! grep -q nagios "$1/etc/passwd"
62 then
63 echo
64 echo -n "Adding user and group nagios..."
65 chroot "$1/" addgroup -S nagios
66 chroot "$1/" adduser -S -D -H -G nagios nagios
67 status
68 fi
70 if [ -f "$1/etc/nagios/resource.cfg" ]
71 then
72 sed -i 's|/usr/lib/nagios|/usr/lib/nagios/plugins|' \
73 "$1/etc/nagios/resource.cfg"
74 fi
76 # Set permissions for files and directories
77 chroot "$1/" chown -R nagios.nagios /usr/lib/nagios/plugins
78 chroot "$1/" chown -R nagios.nagios /etc/nagios/objects
79 }