wok-next annotate nagios/receipt @ rev 21398

updated palemoon (27.9.3 -> 28.9.1)
author Hans-G?nter Theisgen
date Sun Apr 19 06:51:21 2020 +0100 (2020-04-19)
parents d5aab818505e
children
rev   line source
al@20463 1 # SliTaz package receipt v2.
erjo@8330 2
erjo@8330 3 PACKAGE="nagios"
erkan@20803 4 VERSION="3.5.1"
erjo@8330 5 CATEGORY="network"
erjo@8330 6 SHORT_DESC="Host and network monitoring"
al@21020 7 MAINTAINER="devel@slitaz.org"
pascal@15584 8 LICENSE="GPL2"
al@20906 9 WEB_SITE="https://www.nagios.org/"
al@20463 10
erjo@8330 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
erjo@8330 12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
erjo@8330 13
al@21078 14 BUILD_DEPENDS="libgd-dev libpng-dev libjpeg-turbo-dev libtool"
al@21020 15 SPLIT="$PACKAGE-dev"
pascal@15584 16
al@20463 17 compile_rules() {
erjo@8330 18 ./configure \
al@20534 19 --sysconfdir=/etc/nagios \
al@20534 20 --libexecdir=/usr/lib/nagios/plugins \
al@20534 21 --sbindir=/usr/lib/nagios/cgi \
al@20534 22 --datadir=/usr/share/nagios \
al@20534 23 --localstatedir=/var/lib/nagios \
erjo@8330 24 --with-nagios-user=nagios \
erjo@8330 25 --with-nagios-group=nagios \
erjo@8330 26 --with-lockfile=/var/run/nagios/nagios.pid \
erjo@8330 27 --with-checkresult-dir=/var/spool/nagios/checkresults \
erjo@8330 28 --with-httpd-conf=/etc/apache/conf.d \
al@20463 29 $CONFIGURE_ARGS &&
al@20463 30 sed -i 's!HTMLDIR=.*!HTMLDIR=/usr/share/nagios!' html/Makefile &&
al@20463 31
al@21020 32 #~ make all && make DESTDIR=$install fullinstall \
al@21020 33 #~ && make DESTDIR=$install install-config
al@20463 34 make all &&
al@20463 35 make install &&
al@20463 36 make install-config &&
al@20463 37 make install-commandmode &&
al@20463 38 make install-webconf &&
al@20767 39 make install-classicui || return 1
al@20767 40
al@20767 41 install -Dm755 $stuff/nagios $install/etc/init.d/nagios
al@20767 42 install -Dm644 $stuff/htpasswd.users $install/etc/nagios/htpasswd.users
al@20767 43
al@20767 44 cp -r include/ $install/usr/
al@20767 45
al@20767 46 mkdir -p $install/var/log/nagios
al@20767 47
al@20767 48 chown -R root:root $install
al@20767 49 chmod -R g-w $install
al@20767 50 chmod 755 $install/usr/bin/* # was 754
al@20767 51 chmod 644 $install/usr/include/locations.h # was 600
erjo@8330 52 }
erjo@8330 53
al@20463 54 genpkg_rules() {
al@20463 55 case $PACKAGE in
al@20463 56 nagios)
al@20767 57 copy @std
al@20767 58 # Fix Apache config for Nagvis
al@20767 59 sed -i 's/Options None/Options FollowSymLinks/' \
al@20767 60 $fs/etc/apache/conf.d/nagios.conf
al@20463 61
al@21078 62 DEPENDS="libgd libltdl apache nagios-plugins libpng \
al@20767 63 libjpeg-turbo"
al@20463 64 SUGGESTED="nagios-nrpe"
al@20463 65 ;;
al@20463 66 nagios-dev)
al@20767 67 copy @dev
al@20463 68 ;;
al@20463 69 esac
erjo@8330 70 }
erjo@8330 71
al@20463 72 post_install_nagios() {
pascal@18730 73 if ! grep -q nagios "$1/etc/passwd"; then
pascal@18730 74 chroot "$1/" addgroup -S nagios
pascal@18730 75 chroot "$1/" adduser -S -D -H -G nagios nagios
erjo@8330 76 fi
al@20463 77
erjo@8330 78 # Fix perms for files and directories
al@20767 79 chroot "$1/" chown -R nagios.nagios \
al@20767 80 /var/log/nagios \
al@20463 81 /var/spool/nagios \
al@20463 82 /var/lib/nagios \
al@20463 83 /usr/share/nagios \
al@20463 84 /etc/nagios/*
al@20463 85
pascal@18730 86 chmod 2775 "$1/var/lib/nagios/rw"
pascal@18730 87 chroot "$1/" addgroup www nagios
al@20463 88
erjo@8330 89 # Start Nagios daemon if we are on running system
pascal@18730 90 [ "$1" ] || /etc/init.d/nagios start
al@20463 91
al@20463 92 # post_install messages
al@20463 93 [ -n "$quiet" ] || cat <<EOT
al@20463 94
al@20463 95 .--------------------------------------------------------------.
al@20805 96 | To start Nagios server you can run: |
al@20534 97 | /etc/init.d/nagios start |
al@20463 98 | |
al@20463 99 | Or add nagios to RUN_DAEMONS in /etc/rcS.conf |
al@20463 100 |--------------------------------------------------------------|
al@20463 101 | Default login/password for the Web GUI is nagiosadmin/nagios |
al@20463 102 '--------------------------------------------------------------'
al@20463 103 EOT
erjo@8330 104 }
erjo@8330 105
al@20463 106 pre_remove_nagios() {
al@20767 107 [ -n "$1" ] || /etc/init.d/nagios stop
pascal@14466 108 }