wok-next view nagios-plugins/receipt @ rev 20688

OpenSSL upgrade: 1.1.0g [2 Nov 2017] -> 1.1.0h [27 Mar 2018]
author Erkan Yilmaz <erkan@slitaz.org>
date Mon May 21 19:13:18 2018 +0000 (2018-05-21)
parents 4396aed7eb01
children a3c581bf52b8
line source
1 # SliTaz package receipt v2.
3 PACKAGE="nagios-plugins"
4 VERSION="1.4.16"
5 CATEGORY="network"
6 SHORT_DESC="Plugins for host, service and network monitoring program"
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="http://www.nagios.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="$SF_MIRROR/nagiosplug/$TARBALL"
14 BUILD_DEPENDS="openssl-dev radiusclient-ng-dev radiusclient-ng openldap-dev \
15 mysql-dev libmysqlclient"
16 SPLIT="nagios-plugins-mysql"
18 compile_rules() {
19 sed -i '/gets is a security hole/d' gl/stdio*.h
21 ./configure \
22 --libexecdir=/usr/lib/nagios/plugins \
23 --with-nagios-user=nobody \
24 --with-nagios-group=nogroup \
25 --with-ping-command="/bin/ping -w %d -c %d %s" \
26 --with-fping-command="/usr/sbin/fping" \
27 $CONFIGURE_ARGS &&
28 fix libtool &&
29 make &&
30 make DESTDIR=$DESTDIR install &&
31 make DESTDIR=$DESTDIR install-root
32 }
34 genpkg_rules() {
35 case $PACKAGE in
36 nagios-plugins)
37 mkdir -p $fs/usr/lib $fs/etc/nagios/objects
38 cp -a $install/usr/lib/nagios/ $fs/usr/lib
39 $stuff/convertcfg $src/command.cfg commands > $fs/etc/nagios/objects/command.cfg
40 # Move mySQL plugins in separate package.
41 rm -f $fs/usr/lib/nagios/plugins/*mysql*
42 DEPENDS="openssl fping"
43 ;;
44 nagios-plugins-mysql)
45 mkdir -p $fs/usr/lib/nagios/plugins
46 cp -pa $install/usr/lib/nagios/plugins/*mysql* $fs/usr/lib/nagios/plugins
47 DEPENDS="nagios-plugins mysql-client"
48 CATEGORY="network|Nagios MySQL plugin"
49 ;;
50 esac
51 }
53 post_install_nagios_plugins() {
54 if ! grep -q nagios "$1/etc/passwd"; then
55 # Adding user/group nagios...
56 chroot "$1/" addgroup -S nagios
57 chroot "$1/" adduser -S -D -H -G nagios nagios
58 fi
60 if [ -f "$1/etc/nagios/resource.cfg" ]; then
61 sed -i 's|/usr/lib/nagios|/usr/lib/nagios/plugins|' \
62 "$1/etc/nagios/resource.cfg"
63 fi
64 # Set perms for files and directories
65 chroot "$1/" chown -R nagios.nagios /usr/lib/nagios/plugins
66 chroot "$1/" chown -R nagios.nagios /etc/nagios/objects
67 }