wok-next annotate nagios-plugins/receipt @ rev 20976
Follow recent changes in the Python renames
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Sep 25 17:35:51 2018 +0300 (2018-09-25) |
parents | 556349764d57 |
children | d5aab818505e |
rev | line source |
---|---|
al@20464 | 1 # SliTaz package receipt v2. |
erjo@8333 | 2 |
erjo@8333 | 3 PACKAGE="nagios-plugins" |
erjo@14456 | 4 VERSION="1.4.16" |
erjo@8333 | 5 CATEGORY="network" |
al@20464 | 6 SHORT_DESC="Plugins for host, service and network monitoring program" |
erjo@8333 | 7 MAINTAINER="erjo@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 |
al@20464 | 14 BUILD_DEPENDS="openssl-dev radiusclient-ng-dev radiusclient-ng openldap-dev \ |
al@20464 | 15 mysql-dev libmysqlclient" |
al@20464 | 16 SPLIT="nagios-plugins-mysql" |
erjo@8333 | 17 |
al@20464 | 18 compile_rules() { |
pascal@20319 | 19 sed -i '/gets is a security hole/d' gl/stdio*.h |
al@20599 | 20 |
al@20464 | 21 ./configure \ |
al@20464 | 22 --libexecdir=/usr/lib/nagios/plugins \ |
al@20464 | 23 --with-nagios-user=nobody \ |
al@20464 | 24 --with-nagios-group=nogroup \ |
al@20464 | 25 --with-ping-command="/bin/ping -w %d -c %d %s" \ |
al@20464 | 26 --with-fping-command="/usr/sbin/fping" \ |
al@20464 | 27 $CONFIGURE_ARGS && |
al@20599 | 28 fix libtool && |
pascal@15265 | 29 make && |
pascal@14999 | 30 make DESTDIR=$DESTDIR install && |
pascal@14999 | 31 make DESTDIR=$DESTDIR install-root |
erjo@8333 | 32 } |
erjo@8333 | 33 |
al@20464 | 34 genpkg_rules() { |
al@20464 | 35 case $PACKAGE in |
al@20464 | 36 nagios-plugins) |
al@20464 | 37 mkdir -p $fs/usr/lib $fs/etc/nagios/objects |
al@20464 | 38 cp -a $install/usr/lib/nagios/ $fs/usr/lib |
al@20464 | 39 $stuff/convertcfg $src/command.cfg commands > $fs/etc/nagios/objects/command.cfg |
al@20464 | 40 # Move mySQL plugins in separate package. |
al@20464 | 41 rm -f $fs/usr/lib/nagios/plugins/*mysql* |
al@20464 | 42 DEPENDS="openssl fping" |
al@20464 | 43 ;; |
al@20464 | 44 nagios-plugins-mysql) |
al@20464 | 45 mkdir -p $fs/usr/lib/nagios/plugins |
al@20464 | 46 cp -pa $install/usr/lib/nagios/plugins/*mysql* $fs/usr/lib/nagios/plugins |
al@20464 | 47 DEPENDS="nagios-plugins mysql-client" |
al@20464 | 48 CATEGORY="network|Nagios MySQL plugin" |
al@20464 | 49 ;; |
al@20464 | 50 esac |
erjo@8333 | 51 } |
erjo@8333 | 52 |
al@20464 | 53 post_install_nagios_plugins() { |
pascal@18730 | 54 if ! grep -q nagios "$1/etc/passwd"; then |
al@20464 | 55 # Adding user/group nagios... |
pascal@18730 | 56 chroot "$1/" addgroup -S nagios |
pascal@18730 | 57 chroot "$1/" adduser -S -D -H -G nagios nagios |
erjo@8333 | 58 fi |
al@20464 | 59 |
pascal@18730 | 60 if [ -f "$1/etc/nagios/resource.cfg" ]; then |
erjo@8333 | 61 sed -i 's|/usr/lib/nagios|/usr/lib/nagios/plugins|' \ |
pascal@18730 | 62 "$1/etc/nagios/resource.cfg" |
erjo@8333 | 63 fi |
erjo@8333 | 64 # Set perms for files and directories |
pascal@18730 | 65 chroot "$1/" chown -R nagios.nagios /usr/lib/nagios/plugins |
pascal@18730 | 66 chroot "$1/" chown -R nagios.nagios /etc/nagios/objects |
erjo@8333 | 67 } |