wok annotate nagios-plugins/receipt @ rev 24680
updated isomaster (1.3.15 -> 1.3.16)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Mar 12 09:47:59 2022 +0100 (2022-03-12) |
parents | b15cc3561ef8 |
children | cf5131fd17f5 |
rev | line source |
---|---|
erjo@8333 | 1 # SliTaz package receipt. |
erjo@8333 | 2 |
erjo@8333 | 3 PACKAGE="nagios-plugins" |
Hans-G?nter@23213 | 4 VERSION="2.3.3" |
erjo@8333 | 5 CATEGORY="network" |
Hans-G?nter@21512 | 6 SHORT_DESC="Plugins for host, service and network monitoring program nagios." |
erjo@8333 | 7 MAINTAINER="erjo@slitaz.org" |
pascal@14999 | 8 LICENSE="GPL3" |
Hans-G?nter@21512 | 9 WEB_SITE="https://www.nagios-plugins.org/" |
Hans-G?nter@21512 | 10 |
erjo@8333 | 11 TARBALL="$PACKAGE-$VERSION.tar.gz" |
Hans-G?nter@21513 | 12 WGET_URL="https://www.nagios-plugins.org/download/$TARBALL" |
pascal@14999 | 13 |
pascal@23256 | 14 DEPENDS="fping libssl procps" |
Hans-G?nter@21512 | 15 BUILD_DEPENDS="libmysqlclient mysql-dev openldap-dev openssl-dev \ |
pascal@23256 | 16 radiusclient-ng radiusclient-ng-dev procps" |
erjo@8333 | 17 |
pascal@24083 | 18 current_version() |
pascal@24083 | 19 { |
pascal@24083 | 20 wget -O - $(dirname $WGET_URL) 2>/dev/null | \ |
pascal@24083 | 21 sed "/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q |
pascal@24083 | 22 } |
pascal@24083 | 23 |
erjo@8333 | 24 # Rules to configure and make the package. |
erjo@8333 | 25 compile_rules() |
erjo@8333 | 26 { |
Hans-G?nter@21512 | 27 ./configure \ |
Hans-G?nter@21512 | 28 --prefix=/usr \ |
Hans-G?nter@21512 | 29 --libexecdir=/usr/lib/nagios/plugins \ |
Hans-G?nter@21512 | 30 --with-nagios-user=nobody \ |
Hans-G?nter@21512 | 31 --with-nagios-group=nogroup \ |
Hans-G?nter@21512 | 32 --with-ping-command="/bin/ping -w %d -c %d %s" \ |
Hans-G?nter@21512 | 33 --with-fping-command="/usr/sbin/fping" \ |
Hans-G?nter@21512 | 34 --mandir=/usr/share/man \ |
Hans-G?nter@23213 | 35 $CONFIGURE_ARGS && |
pascal@15265 | 36 make && |
pascal@14999 | 37 make DESTDIR=$DESTDIR install && |
pascal@14999 | 38 make DESTDIR=$DESTDIR install-root |
erjo@8333 | 39 } |
erjo@8333 | 40 |
erjo@8333 | 41 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@8333 | 42 genpkg_rules() |
erjo@8333 | 43 { |
Hans-G?nter@21512 | 44 mkdir -p $fs/usr/lib |
Hans-G?nter@21512 | 45 mkdir -p $fs/etc/nagios/objects |
Hans-G?nter@21512 | 46 |
Hans-G?nter@23213 | 47 cp -a $install/usr/lib/nagios $fs/usr/lib |
erjo@8333 | 48 |
erjo@8333 | 49 # |
erjo@8333 | 50 stuff/convertcfg $src/command.cfg commands > $fs/etc/nagios/objects/command.cfg |
erjo@8333 | 51 |
Hans-G?nter@21512 | 52 # Move mySQL plugins in a separate package. |
Hans-G?nter@23213 | 53 rm -f $fs/usr/lib/nagios/plugins/*mysql* |
erjo@8333 | 54 } |
erjo@8333 | 55 |
erjo@8333 | 56 post_install() |
erjo@8333 | 57 { |
Hans-G?nter@23213 | 58 if ! grep -q nagios "$1/etc/passwd" |
Hans-G?nter@23213 | 59 then |
pascal@20319 | 60 echo |
erjo@8333 | 61 echo -n "Adding user/group nagios..." |
pascal@18730 | 62 chroot "$1/" addgroup -S nagios |
pascal@18730 | 63 chroot "$1/" adduser -S -D -H -G nagios nagios |
erjo@8333 | 64 status |
erjo@8333 | 65 fi |
erjo@8333 | 66 |
Hans-G?nter@23213 | 67 if [ -f "$1/etc/nagios/resource.cfg" ] |
Hans-G?nter@23213 | 68 then |
erjo@8333 | 69 sed -i 's|/usr/lib/nagios|/usr/lib/nagios/plugins|' \ |
pascal@18730 | 70 "$1/etc/nagios/resource.cfg" |
erjo@8333 | 71 fi |
Hans-G?nter@21512 | 72 |
Hans-G?nter@21512 | 73 # Set permissions for files and directories |
Hans-G?nter@23213 | 74 chroot "$1/" chown -R nagios.nagios /usr/lib/nagios/plugins |
Hans-G?nter@23213 | 75 chroot "$1/" chown -R nagios.nagios /etc/nagios/objects |
erjo@8333 | 76 } |