wok-current annotate nagios-plugins/receipt @ rev 22446
vlc: remove notify deps -> did not help
author | Erkan Yilmaz <erkan@slitaz.org> |
---|---|
date | Mon Dec 23 15:52:17 2019 +0000 (2019-12-23) |
parents | 269143578a96 |
children | 39e11db3ea78 |
rev | line source |
---|---|
erjo@8333 | 1 # SliTaz package receipt. |
erjo@8333 | 2 |
erjo@8333 | 3 PACKAGE="nagios-plugins" |
Hans-G?nter@21512 | 4 VERSION="2.2.1" |
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 |
Hans-G?nter@21512 | 14 DEPENDS="fping libssl" |
Hans-G?nter@21512 | 15 BUILD_DEPENDS="libmysqlclient mysql-dev openldap-dev openssl-dev \ |
Hans-G?nter@21512 | 16 radiusclient-ng radiusclient-ng-dev" |
erjo@8333 | 17 |
erjo@8333 | 18 # Rules to configure and make the package. |
erjo@8333 | 19 compile_rules() |
erjo@8333 | 20 { |
Hans-G?nter@21512 | 21 ./configure \ |
Hans-G?nter@21512 | 22 --prefix=/usr \ |
Hans-G?nter@21512 | 23 --libexecdir=/usr/lib/nagios/plugins \ |
Hans-G?nter@21512 | 24 --with-nagios-user=nobody \ |
Hans-G?nter@21512 | 25 --with-nagios-group=nogroup \ |
Hans-G?nter@21512 | 26 --with-ping-command="/bin/ping -w %d -c %d %s" \ |
Hans-G?nter@21512 | 27 --with-fping-command="/usr/sbin/fping" \ |
Hans-G?nter@21512 | 28 --mandir=/usr/share/man \ |
Hans-G?nter@21512 | 29 $CONFIGURE_ARGS |
pascal@15265 | 30 make && |
pascal@14999 | 31 make DESTDIR=$DESTDIR install && |
pascal@14999 | 32 make DESTDIR=$DESTDIR install-root |
erjo@8333 | 33 } |
erjo@8333 | 34 |
erjo@8333 | 35 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@8333 | 36 genpkg_rules() |
erjo@8333 | 37 { |
Hans-G?nter@21512 | 38 mkdir -p $fs/usr/lib |
Hans-G?nter@21512 | 39 mkdir -p $fs/etc/nagios/objects |
Hans-G?nter@21512 | 40 |
pascal@14999 | 41 cp -a $install/usr/lib/nagios/ $fs/usr/lib |
erjo@8333 | 42 |
erjo@8333 | 43 # |
erjo@8333 | 44 stuff/convertcfg $src/command.cfg commands > $fs/etc/nagios/objects/command.cfg |
erjo@8333 | 45 |
Hans-G?nter@21512 | 46 # Move mySQL plugins in a separate package. |
erjo@8333 | 47 rm -f $fs/usr/lib/nagios/plugins/*mysql* |
erjo@8333 | 48 } |
erjo@8333 | 49 |
erjo@8333 | 50 post_install() |
erjo@8333 | 51 { |
pascal@18730 | 52 if ! grep -q nagios "$1/etc/passwd"; then |
pascal@20319 | 53 echo |
erjo@8333 | 54 echo -n "Adding user/group nagios..." |
pascal@18730 | 55 chroot "$1/" addgroup -S nagios |
pascal@18730 | 56 chroot "$1/" adduser -S -D -H -G nagios nagios |
erjo@8333 | 57 status |
erjo@8333 | 58 fi |
erjo@8333 | 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 |
Hans-G?nter@21512 | 64 |
Hans-G?nter@21512 | 65 # Set permissions for files and directories |
pascal@18730 | 66 chroot "$1/" chown -R nagios.nagios /usr/lib/nagios/plugins |
pascal@18730 | 67 chroot "$1/" chown -R nagios.nagios /etc/nagios/objects |
erjo@8333 | 68 } |