wok-current annotate nagios-plugins/receipt @ rev 25381
updated unifont (13.0.01 -> 14.0.04)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Jul 30 16:49:06 2022 +0100 (2022-07-30) |
parents | 08e0172a1a69 |
children |
rev | line source |
---|---|
erjo@8333 | 1 # SliTaz package receipt. |
erjo@8333 | 2 |
erjo@8333 | 3 PACKAGE="nagios-plugins" |
Hans-G?nter@24950 | 4 VERSION="2.4.0" |
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@24950 | 12 WGET_URL="https://github.com/$PACKAGE/$PACKAGE/archive/refs/tags/release-$VERSION.tar.gz" |
pascal@14999 | 13 |
Hans-G?nter@24950 | 14 SUGGESTED="nagios-plugins-lang" |
Hans-G?nter@24951 | 15 DEPENDS="fping libssl procps" |
Hans-G?nter@24951 | 16 BUILD_DEPENDS="automake file libmysqlclient mysql-dev openldap-dev openssl-dev |
Hans-G?nter@24951 | 17 procps radiusclient-ng radiusclient-ng-dev" |
erjo@8333 | 18 |
pascal@24083 | 19 current_version() |
pascal@24083 | 20 { |
pascal@24083 | 21 wget -O - $(dirname $WGET_URL) 2>/dev/null | \ |
pascal@24083 | 22 sed "/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q |
pascal@24083 | 23 } |
pascal@24083 | 24 |
erjo@8333 | 25 # Rules to configure and make the package. |
erjo@8333 | 26 compile_rules() |
erjo@8333 | 27 { |
Hans-G?nter@24952 | 28 ./tools/setup && |
Hans-G?nter@21512 | 29 ./configure \ |
Hans-G?nter@21512 | 30 --prefix=/usr \ |
Hans-G?nter@21512 | 31 --libexecdir=/usr/lib/nagios/plugins \ |
Hans-G?nter@21512 | 32 --with-nagios-user=nobody \ |
Hans-G?nter@21512 | 33 --with-nagios-group=nogroup \ |
Hans-G?nter@21512 | 34 --with-ping-command="/bin/ping -w %d -c %d %s" \ |
Hans-G?nter@21512 | 35 --with-fping-command="/usr/sbin/fping" \ |
Hans-G?nter@21512 | 36 --mandir=/usr/share/man \ |
Hans-G?nter@23213 | 37 $CONFIGURE_ARGS && |
Hans-G?nter@24952 | 38 patch --strip=0 --input=$stuff/patches/check_load.c-2.4.0 && |
pascal@15265 | 39 make && |
Hans-G?nter@24950 | 40 make install DESTDIR=$DESTDIR && |
Hans-G?nter@24950 | 41 make install-root DESTDIR=$DESTDIR |
erjo@8333 | 42 } |
erjo@8333 | 43 |
erjo@8333 | 44 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@8333 | 45 genpkg_rules() |
erjo@8333 | 46 { |
Hans-G?nter@21512 | 47 mkdir -p $fs/usr/lib |
Hans-G?nter@21512 | 48 mkdir -p $fs/etc/nagios/objects |
Hans-G?nter@21512 | 49 |
Hans-G?nter@23213 | 50 cp -a $install/usr/lib/nagios $fs/usr/lib |
erjo@8333 | 51 |
erjo@8333 | 52 # |
erjo@8333 | 53 stuff/convertcfg $src/command.cfg commands > $fs/etc/nagios/objects/command.cfg |
erjo@8333 | 54 |
Hans-G?nter@21512 | 55 # Move mySQL plugins in a separate package. |
Hans-G?nter@23213 | 56 rm -f $fs/usr/lib/nagios/plugins/*mysql* |
erjo@8333 | 57 } |
erjo@8333 | 58 |
erjo@8333 | 59 post_install() |
erjo@8333 | 60 { |
Hans-G?nter@23213 | 61 if ! grep -q nagios "$1/etc/passwd" |
Hans-G?nter@23213 | 62 then |
pascal@20319 | 63 echo |
Hans-G?nter@24950 | 64 echo -n "Adding user and group nagios..." |
pascal@18730 | 65 chroot "$1/" addgroup -S nagios |
pascal@18730 | 66 chroot "$1/" adduser -S -D -H -G nagios nagios |
erjo@8333 | 67 status |
erjo@8333 | 68 fi |
Hans-G?nter@24950 | 69 |
Hans-G?nter@23213 | 70 if [ -f "$1/etc/nagios/resource.cfg" ] |
Hans-G?nter@23213 | 71 then |
erjo@8333 | 72 sed -i 's|/usr/lib/nagios|/usr/lib/nagios/plugins|' \ |
pascal@18730 | 73 "$1/etc/nagios/resource.cfg" |
erjo@8333 | 74 fi |
Hans-G?nter@21512 | 75 |
Hans-G?nter@21512 | 76 # Set permissions for files and directories |
Hans-G?nter@23213 | 77 chroot "$1/" chown -R nagios.nagios /usr/lib/nagios/plugins |
Hans-G?nter@23213 | 78 chroot "$1/" chown -R nagios.nagios /etc/nagios/objects |
erjo@8333 | 79 } |