wok view nagios-plugins/receipt @ rev 24951

nagios-plugins: removed patch
author Hans-G?nter Theisgen
date Sat Apr 23 10:41:57 2022 +0100 (2022-04-23)
parents cf5131fd17f5
children afc372dd794f
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 ./autogen.sh &&
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 make &&
39 make install DESTDIR=$DESTDIR &&
40 make install-root DESTDIR=$DESTDIR
41 }
43 # Rules to gen a SliTaz package suitable for Tazpkg.
44 genpkg_rules()
45 {
46 mkdir -p $fs/usr/lib
47 mkdir -p $fs/etc/nagios/objects
49 cp -a $install/usr/lib/nagios $fs/usr/lib
51 #
52 stuff/convertcfg $src/command.cfg commands > $fs/etc/nagios/objects/command.cfg
54 # Move mySQL plugins in a separate package.
55 rm -f $fs/usr/lib/nagios/plugins/*mysql*
56 }
58 post_install()
59 {
60 if ! grep -q nagios "$1/etc/passwd"
61 then
62 echo
63 echo -n "Adding user and group nagios..."
64 chroot "$1/" addgroup -S nagios
65 chroot "$1/" adduser -S -D -H -G nagios nagios
66 status
67 fi
69 if [ -f "$1/etc/nagios/resource.cfg" ]
70 then
71 sed -i 's|/usr/lib/nagios|/usr/lib/nagios/plugins|' \
72 "$1/etc/nagios/resource.cfg"
73 fi
75 # Set permissions for files and directories
76 chroot "$1/" chown -R nagios.nagios /usr/lib/nagios/plugins
77 chroot "$1/" chown -R nagios.nagios /etc/nagios/objects
78 }