wok-next rev 21381

updated nagios-plugins (1.4.16 -> 2.3.3)
author Hans-G?nter Theisgen
date Thu Apr 16 17:12:25 2020 +0100 (2020-04-16)
parents 81bc61d6540d
children d0195b8349a7
files nagios-plugins/receipt
line diff
     1.1 --- a/nagios-plugins/receipt	Thu Apr 16 16:41:38 2020 +0100
     1.2 +++ b/nagios-plugins/receipt	Thu Apr 16 17:12:25 2020 +0100
     1.3 @@ -1,29 +1,30 @@
     1.4  # SliTaz package receipt v2.
     1.5  
     1.6  PACKAGE="nagios-plugins"
     1.7 -VERSION="1.4.16"
     1.8 +VERSION="2.3.3"
     1.9  CATEGORY="network"
    1.10  SHORT_DESC="Plugins for host, service and network monitoring program"
    1.11 -MAINTAINER="devel@slitaz.org"
    1.12 +MAINTAINER="maintainer@slitaz.org"
    1.13  LICENSE="GPL3"
    1.14  WEB_SITE="https://www.nagios.org/"
    1.15  
    1.16  TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.17  WGET_URL="$SF_MIRROR/nagiosplug/$TARBALL"
    1.18  
    1.19 -BUILD_DEPENDS="openssl-dev radiusclient-ng-dev radiusclient-ng openldap-dev \
    1.20 -mysql-dev libmysqlclient"
    1.21 +BUILD_DEPENDS="libmysqlclient mysql-dev openldap-dev openssl-dev 
    1.22 +	radiusclient-ng radiusclient-ng-dev"
    1.23  SPLIT="$PACKAGE-mysql"
    1.24  
    1.25 -compile_rules() {
    1.26 +compile_rules()
    1.27 +{
    1.28  	sed -i '/gets is a security hole/d' gl/stdio*.h
    1.29  
    1.30 -	./configure \
    1.31 -		--libexecdir=/usr/lib/nagios/plugins \
    1.32 -		--with-nagios-user=nobody \
    1.33 -		--with-nagios-group=nogroup \
    1.34 -		--with-ping-command="/bin/ping -w %d -c %d %s" \
    1.35 -		--with-fping-command="/usr/sbin/fping" \
    1.36 +	./configure						\
    1.37 +		--libexecdir=/usr/lib/nagios/plugins		\
    1.38 +		--with-nagios-user=nobody			\
    1.39 +		--with-nagios-group=nogroup			\
    1.40 +		--with-ping-command="/bin/ping -w %d -c %d %s"	\
    1.41 +		--with-fping-command="/usr/sbin/fping"		\
    1.42  		$CONFIGURE_ARGS &&
    1.43  	fix libtool &&
    1.44  	make &&
    1.45 @@ -31,37 +32,46 @@
    1.46  	make DESTDIR=$install install-root
    1.47  }
    1.48  
    1.49 -genpkg_rules() {
    1.50 +genpkg_rules()
    1.51 +{
    1.52  	case $PACKAGE in
    1.53  		nagios-plugins)
    1.54 -			mkdir -p $fs/usr/lib $fs/etc/nagios/objects
    1.55 -			cp -a $install/usr/lib/nagios/ $fs/usr/lib
    1.56 +			mkdir -p $fs/usr/lib
    1.57 +			mkdir -p $fs/etc/nagios/objects
    1.58 +
    1.59 +			cp -a $install/usr/lib/nagios	$fs/usr/lib
    1.60  			$stuff/convertcfg $src/command.cfg commands > $fs/etc/nagios/objects/command.cfg
    1.61 +
    1.62  			# Move mySQL plugins in separate package.
    1.63  			rm -f $fs/usr/lib/nagios/plugins/*mysql*
    1.64 -			DEPENDS="openssl fping"
    1.65 +			DEPENDS="fping openssl"
    1.66  			;;
    1.67  		nagios-plugins-mysql)
    1.68  			mkdir -p $fs/usr/lib/nagios/plugins
    1.69 -			cp -pa $install/usr/lib/nagios/plugins/*mysql* $fs/usr/lib/nagios/plugins
    1.70 -			DEPENDS="nagios-plugins mysql-client"
    1.71 +			cp -pa $install/usr/lib/nagios/plugins/*mysql*	$fs/usr/lib/nagios/plugins
    1.72 +
    1.73 +			DEPENDS="mysql-client nagios-plugins"
    1.74  			CATEGORY="network|Nagios MySQL plugin"
    1.75  			;;
    1.76  	esac
    1.77  }
    1.78  
    1.79 -post_install_nagios_plugins() {
    1.80 -	if ! grep -q nagios "$1/etc/passwd"; then
    1.81 +post_install_nagios_plugins()
    1.82 +{
    1.83 +	if ! grep -q nagios "$1/etc/passwd"
    1.84 +	  then
    1.85  		# Adding user/group nagios...
    1.86  		chroot "$1/" addgroup -S nagios
    1.87  		chroot "$1/" adduser -S -D -H -G nagios nagios
    1.88  	fi
    1.89  
    1.90 -	if [ -f "$1/etc/nagios/resource.cfg" ]; then
    1.91 +	if [ -f "$1/etc/nagios/resource.cfg" ]
    1.92 +	  then
    1.93  		sed -i 's|/usr/lib/nagios|/usr/lib/nagios/plugins|' \
    1.94  		   "$1/etc/nagios/resource.cfg"
    1.95  	fi
    1.96 -	# Set perms for files and directories
    1.97 -	chroot "$1/" chown -R nagios.nagios /usr/lib/nagios/plugins 
    1.98 -	chroot "$1/" chown -R nagios.nagios /etc/nagios/objects
    1.99 +
   1.100 +	# Set permissions for files and directories
   1.101 +	chroot "$1/" chown -R nagios.nagios	/usr/lib/nagios/plugins 
   1.102 +	chroot "$1/" chown -R nagios.nagios	/etc/nagios/objects
   1.103  }