wok-next annotate nagios-plugins/receipt @ rev 21573
updated dansguardian (2.10.1.1 -> 2.12.0.3)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Jun 22 17:38:17 2020 +0100 (2020-06-22) |
parents | d5aab818505e |
children |
rev | line source |
---|---|
al@20464 | 1 # SliTaz package receipt v2. |
erjo@8333 | 2 |
erjo@8333 | 3 PACKAGE="nagios-plugins" |
Hans-G?nter@21381 | 4 VERSION="2.3.3" |
erjo@8333 | 5 CATEGORY="network" |
al@20464 | 6 SHORT_DESC="Plugins for host, service and network monitoring program" |
Hans-G?nter@21381 | 7 MAINTAINER="maintainer@slitaz.org" |
pascal@14999 | 8 LICENSE="GPL3" |
al@20906 | 9 WEB_SITE="https://www.nagios.org/" |
al@20464 | 10 |
erjo@8333 | 11 TARBALL="$PACKAGE-$VERSION.tar.gz" |
erjo@8333 | 12 WGET_URL="$SF_MIRROR/nagiosplug/$TARBALL" |
pascal@14999 | 13 |
Hans-G?nter@21381 | 14 BUILD_DEPENDS="libmysqlclient mysql-dev openldap-dev openssl-dev |
Hans-G?nter@21381 | 15 radiusclient-ng radiusclient-ng-dev" |
al@21020 | 16 SPLIT="$PACKAGE-mysql" |
erjo@8333 | 17 |
Hans-G?nter@21381 | 18 compile_rules() |
Hans-G?nter@21381 | 19 { |
pascal@20319 | 20 sed -i '/gets is a security hole/d' gl/stdio*.h |
al@20599 | 21 |
Hans-G?nter@21381 | 22 ./configure \ |
Hans-G?nter@21381 | 23 --libexecdir=/usr/lib/nagios/plugins \ |
Hans-G?nter@21381 | 24 --with-nagios-user=nobody \ |
Hans-G?nter@21381 | 25 --with-nagios-group=nogroup \ |
Hans-G?nter@21381 | 26 --with-ping-command="/bin/ping -w %d -c %d %s" \ |
Hans-G?nter@21381 | 27 --with-fping-command="/usr/sbin/fping" \ |
al@20464 | 28 $CONFIGURE_ARGS && |
al@20599 | 29 fix libtool && |
pascal@15265 | 30 make && |
al@21020 | 31 make DESTDIR=$install install && |
al@21020 | 32 make DESTDIR=$install install-root |
erjo@8333 | 33 } |
erjo@8333 | 34 |
Hans-G?nter@21381 | 35 genpkg_rules() |
Hans-G?nter@21381 | 36 { |
al@20464 | 37 case $PACKAGE in |
al@20464 | 38 nagios-plugins) |
Hans-G?nter@21381 | 39 mkdir -p $fs/usr/lib |
Hans-G?nter@21381 | 40 mkdir -p $fs/etc/nagios/objects |
Hans-G?nter@21381 | 41 |
Hans-G?nter@21381 | 42 cp -a $install/usr/lib/nagios $fs/usr/lib |
al@20464 | 43 $stuff/convertcfg $src/command.cfg commands > $fs/etc/nagios/objects/command.cfg |
Hans-G?nter@21381 | 44 |
al@20464 | 45 # Move mySQL plugins in separate package. |
al@20464 | 46 rm -f $fs/usr/lib/nagios/plugins/*mysql* |
Hans-G?nter@21381 | 47 DEPENDS="fping openssl" |
al@20464 | 48 ;; |
al@20464 | 49 nagios-plugins-mysql) |
al@20464 | 50 mkdir -p $fs/usr/lib/nagios/plugins |
Hans-G?nter@21381 | 51 cp -pa $install/usr/lib/nagios/plugins/*mysql* $fs/usr/lib/nagios/plugins |
Hans-G?nter@21381 | 52 |
Hans-G?nter@21381 | 53 DEPENDS="mysql-client nagios-plugins" |
al@20464 | 54 CATEGORY="network|Nagios MySQL plugin" |
al@20464 | 55 ;; |
al@20464 | 56 esac |
erjo@8333 | 57 } |
erjo@8333 | 58 |
Hans-G?nter@21381 | 59 post_install_nagios_plugins() |
Hans-G?nter@21381 | 60 { |
Hans-G?nter@21381 | 61 if ! grep -q nagios "$1/etc/passwd" |
Hans-G?nter@21381 | 62 then |
al@20464 | 63 # Adding user/group nagios... |
pascal@18730 | 64 chroot "$1/" addgroup -S nagios |
pascal@18730 | 65 chroot "$1/" adduser -S -D -H -G nagios nagios |
erjo@8333 | 66 fi |
al@20464 | 67 |
Hans-G?nter@21381 | 68 if [ -f "$1/etc/nagios/resource.cfg" ] |
Hans-G?nter@21381 | 69 then |
erjo@8333 | 70 sed -i 's|/usr/lib/nagios|/usr/lib/nagios/plugins|' \ |
pascal@18730 | 71 "$1/etc/nagios/resource.cfg" |
erjo@8333 | 72 fi |
Hans-G?nter@21381 | 73 |
Hans-G?nter@21381 | 74 # Set permissions for files and directories |
Hans-G?nter@21381 | 75 chroot "$1/" chown -R nagios.nagios /usr/lib/nagios/plugins |
Hans-G?nter@21381 | 76 chroot "$1/" chown -R nagios.nagios /etc/nagios/objects |
erjo@8333 | 77 } |