wok-next view nagios-plugins/receipt @ rev 21527
updated bootchart (0.9 -> 1.20)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Jun 19 15:06:45 2020 +0100 (2020-06-19) |
parents | d5aab818505e |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="nagios-plugins"
4 VERSION="2.3.3"
5 CATEGORY="network"
6 SHORT_DESC="Plugins for host, service and network monitoring program"
7 MAINTAINER="maintainer@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="https://www.nagios.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="$SF_MIRROR/nagiosplug/$TARBALL"
14 BUILD_DEPENDS="libmysqlclient mysql-dev openldap-dev openssl-dev
15 radiusclient-ng radiusclient-ng-dev"
16 SPLIT="$PACKAGE-mysql"
18 compile_rules()
19 {
20 sed -i '/gets is a security hole/d' gl/stdio*.h
22 ./configure \
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 $CONFIGURE_ARGS &&
29 fix libtool &&
30 make &&
31 make DESTDIR=$install install &&
32 make DESTDIR=$install install-root
33 }
35 genpkg_rules()
36 {
37 case $PACKAGE in
38 nagios-plugins)
39 mkdir -p $fs/usr/lib
40 mkdir -p $fs/etc/nagios/objects
42 cp -a $install/usr/lib/nagios $fs/usr/lib
43 $stuff/convertcfg $src/command.cfg commands > $fs/etc/nagios/objects/command.cfg
45 # Move mySQL plugins in separate package.
46 rm -f $fs/usr/lib/nagios/plugins/*mysql*
47 DEPENDS="fping openssl"
48 ;;
49 nagios-plugins-mysql)
50 mkdir -p $fs/usr/lib/nagios/plugins
51 cp -pa $install/usr/lib/nagios/plugins/*mysql* $fs/usr/lib/nagios/plugins
53 DEPENDS="mysql-client nagios-plugins"
54 CATEGORY="network|Nagios MySQL plugin"
55 ;;
56 esac
57 }
59 post_install_nagios_plugins()
60 {
61 if ! grep -q nagios "$1/etc/passwd"
62 then
63 # Adding user/group nagios...
64 chroot "$1/" addgroup -S nagios
65 chroot "$1/" adduser -S -D -H -G nagios nagios
66 fi
68 if [ -f "$1/etc/nagios/resource.cfg" ]
69 then
70 sed -i 's|/usr/lib/nagios|/usr/lib/nagios/plugins|' \
71 "$1/etc/nagios/resource.cfg"
72 fi
74 # Set permissions for files and directories
75 chroot "$1/" chown -R nagios.nagios /usr/lib/nagios/plugins
76 chroot "$1/" chown -R nagios.nagios /etc/nagios/objects
77 }