wok-next diff nagios-plugins/receipt @ rev 20474
Tiny edits... (again)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Mar 10 17:39:42 2018 +0200 (2018-03-10) |
parents | e6615350078d |
children | 556349764d57 |
line diff
1.1 --- a/nagios-plugins/receipt Wed Feb 28 16:28:07 2018 +0200 1.2 +++ b/nagios-plugins/receipt Sat Mar 10 17:39:42 2018 +0200 1.3 @@ -1,60 +1,62 @@ 1.4 -# SliTaz package receipt. 1.5 +# SliTaz package receipt v2. 1.6 1.7 PACKAGE="nagios-plugins" 1.8 VERSION="1.4.16" 1.9 CATEGORY="network" 1.10 -SHORT_DESC="Plugins for host, service and network monitoring program." 1.11 +SHORT_DESC="Plugins for host, service and network monitoring program" 1.12 MAINTAINER="erjo@slitaz.org" 1.13 LICENSE="GPL3" 1.14 +WEB_SITE="http://www.nagios.org/" 1.15 + 1.16 TARBALL="$PACKAGE-$VERSION.tar.gz" 1.17 -WEB_SITE="http://www.nagios.org/" 1.18 WGET_URL="$SF_MIRROR/nagiosplug/$TARBALL" 1.19 1.20 -DEPENDS="openssl fping" 1.21 -BUILD_DEPENDS="openssl-dev radiusclient-ng-dev radiusclient-ng openldap-dev 1.22 - mysql-dev libmysqlclient" 1.23 +BUILD_DEPENDS="openssl-dev radiusclient-ng-dev radiusclient-ng openldap-dev \ 1.24 +mysql-dev libmysqlclient" 1.25 +SPLIT="nagios-plugins-mysql" 1.26 1.27 -# Rules to configure and make the package. 1.28 -compile_rules() 1.29 -{ 1.30 +compile_rules() { 1.31 sed -i '/gets is a security hole/d' gl/stdio*.h 1.32 - ./configure --prefix=/usr \ 1.33 - --libexecdir=/usr/lib/nagios/plugins \ 1.34 - --with-nagios-user=nobody \ 1.35 - --with-nagios-group=nogroup \ 1.36 - --with-ping-command="/bin/ping -w %d -c %d %s" \ 1.37 - --with-fping-command="/usr/sbin/fping" \ 1.38 - --mandir=/usr/share/man $CONFIGURE_ARGS 1.39 - 1.40 + ./configure \ 1.41 + --prefix=/usr \ 1.42 + --libexecdir=/usr/lib/nagios/plugins \ 1.43 + --with-nagios-user=nobody \ 1.44 + --with-nagios-group=nogroup \ 1.45 + --with-ping-command="/bin/ping -w %d -c %d %s" \ 1.46 + --with-fping-command="/usr/sbin/fping" \ 1.47 + --mandir=/usr/share/man \ 1.48 + $CONFIGURE_ARGS && 1.49 make && 1.50 make DESTDIR=$DESTDIR install && 1.51 make DESTDIR=$DESTDIR install-root 1.52 } 1.53 1.54 -# Rules to gen a SliTaz package suitable for Tazpkg. 1.55 -genpkg_rules() 1.56 -{ 1.57 - mkdir -p $fs/usr/lib $fs/etc/nagios/objects 1.58 - 1.59 - cp -a $install/usr/lib/nagios/ $fs/usr/lib 1.60 - 1.61 - # 1.62 - stuff/convertcfg $src/command.cfg commands > $fs/etc/nagios/objects/command.cfg 1.63 - 1.64 - # Move mySQL plugins in separate package. 1.65 - rm -f $fs/usr/lib/nagios/plugins/*mysql* 1.66 - 1.67 +genpkg_rules() { 1.68 + case $PACKAGE in 1.69 + nagios-plugins) 1.70 + mkdir -p $fs/usr/lib $fs/etc/nagios/objects 1.71 + cp -a $install/usr/lib/nagios/ $fs/usr/lib 1.72 + $stuff/convertcfg $src/command.cfg commands > $fs/etc/nagios/objects/command.cfg 1.73 + # Move mySQL plugins in separate package. 1.74 + rm -f $fs/usr/lib/nagios/plugins/*mysql* 1.75 + DEPENDS="openssl fping" 1.76 + ;; 1.77 + nagios-plugins-mysql) 1.78 + mkdir -p $fs/usr/lib/nagios/plugins 1.79 + cp -pa $install/usr/lib/nagios/plugins/*mysql* $fs/usr/lib/nagios/plugins 1.80 + DEPENDS="nagios-plugins mysql-client" 1.81 + CATEGORY="network|Nagios MySQL plugin" 1.82 + ;; 1.83 + esac 1.84 } 1.85 1.86 -post_install() 1.87 -{ 1.88 +post_install_nagios_plugins() { 1.89 if ! grep -q nagios "$1/etc/passwd"; then 1.90 - echo -n "Adding user/group nagios..." 1.91 + # Adding user/group nagios... 1.92 chroot "$1/" addgroup -S nagios 1.93 chroot "$1/" adduser -S -D -H -G nagios nagios 1.94 - status 1.95 fi 1.96 - 1.97 + 1.98 if [ -f "$1/etc/nagios/resource.cfg" ]; then 1.99 sed -i 's|/usr/lib/nagios|/usr/lib/nagios/plugins|' \ 1.100 "$1/etc/nagios/resource.cfg"