wok annotate nagios/receipt @ rev 21992
updated sweethome3d (5.7 -> 6.2)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Oct 16 16:57:23 2019 +0100 (2019-10-16) |
parents | a78610b2eb47 |
children | 9181c7e3baef |
rev | line source |
---|---|
erjo@8330 | 1 # SliTaz package receipt. |
erjo@8330 | 2 |
erjo@8330 | 3 PACKAGE="nagios" |
Hans-G?nter@21510 | 4 VERSION="4.4.3" |
erjo@8330 | 5 CATEGORY="network" |
Hans-G?nter@21510 | 6 SHORT_DESC="Host and network monitoring." |
erjo@8330 | 7 MAINTAINER="erjo@slitaz.org" |
pascal@15584 | 8 LICENSE="GPL2" |
Hans-G?nter@21510 | 9 WEB_SITE="https://www.nagios.org/" |
Hans-G?nter@21510 | 10 |
erjo@8330 | 11 TARBALL="$PACKAGE-$VERSION.tar.gz" |
erjo@8330 | 12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
Hans-G?nter@21510 | 13 |
erjo@8330 | 14 SUGGESTED="nagios-nrpe" |
Hans-G?nter@21510 | 15 DEPENDS="apache libjpeg libltdl libpng nagios-plugins" |
Hans-G?nter@21510 | 16 BUILD_DEPENDS="jpeg-dev libgd-dev libpng-dev libtool procps unzip" |
Hans-G?nter@21510 | 17 # busybox ps and unzip do not supply the required options |
pascal@15584 | 18 |
erjo@8330 | 19 # Rules to configure and make the package. |
erjo@8330 | 20 compile_rules() |
erjo@8330 | 21 { |
Hans-G?nter@21510 | 22 while read patch_file |
Hans-G?nter@21510 | 23 do |
erjo@8330 | 24 if [ ! -f done.$patch_file ]; then |
slaxemulator@9700 | 25 patch -p1 < $stuff/$patch_file || return 1 |
erjo@8330 | 26 touch done.$patch_file |
erjo@8330 | 27 fi |
Hans-G?nter@21510 | 28 done <<EOT |
pascal@20376 | 29 $PACKAGE-Makefiles.u |
erjo@8330 | 30 EOT |
Hans-G?nter@21510 | 31 |
Hans-G?nter@21510 | 32 ./configure \ |
Hans-G?nter@21510 | 33 --prefix=/usr \ |
Hans-G?nter@21510 | 34 --infodir=/usr/share/info \ |
Hans-G?nter@21510 | 35 --mandir=/usr/share/man \ |
Hans-G?nter@21510 | 36 --with-nagios-user=nagios \ |
Hans-G?nter@21510 | 37 --with-nagios-group=nagios \ |
Hans-G?nter@21510 | 38 --with-lockfile=/var/run/nagios/nagios.pid \ |
Hans-G?nter@21510 | 39 --with-checkresult-dir=/var/spool/nagios/checkresults \ |
Hans-G?nter@21510 | 40 --sysconfdir=/etc/nagios \ |
Hans-G?nter@21510 | 41 --with-httpd-conf=/etc/apache/conf.d \ |
Hans-G?nter@21510 | 42 --libexecdir=/usr/lib/nagios/plugins \ |
Hans-G?nter@21510 | 43 --sbindir=/usr/lib/nagios/cgi \ |
Hans-G?nter@21510 | 44 --datadir=/usr/share/nagios \ |
Hans-G?nter@21510 | 45 --localstatedir=/var/lib/nagios \ |
erjo@8330 | 46 $CONFIGURE_ARGS |
erjo@8330 | 47 |
erjo@9865 | 48 sed -i s!HTMLDIR=.*!HTMLDIR=/usr/share/nagios! html/Makefile |
erjo@9865 | 49 |
pascal@15584 | 50 #~ make all && make DESTDIR=$DESTDIR fullinstall \ |
pascal@15584 | 51 #~ && make DESTDIR=$DESTDIR install-config |
Hans-G?nter@21510 | 52 make all && |
Hans-G?nter@21510 | 53 make install && |
Hans-G?nter@21510 | 54 make install-config && |
Hans-G?nter@21510 | 55 make install-commandmode && |
Hans-G?nter@21510 | 56 make install-webconf && |
Hans-G?nter@21510 | 57 make install-classicui |
erjo@8330 | 58 } |
erjo@8330 | 59 |
erjo@8330 | 60 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@8330 | 61 genpkg_rules() |
erjo@8330 | 62 { |
erjo@8330 | 63 mkdir -p $fs/usr $fs/etc/init.d \ |
erjo@8700 | 64 $fs/var/lib/nagios/rw \ |
pascal@14465 | 65 $fs/var/log/nagios \ |
erjo@8330 | 66 $fs/var/spool/nagios/checkresults \ |
erjo@8330 | 67 $fs/etc/apache |
erjo@8330 | 68 |
Hans-G?nter@21510 | 69 cp -a $install/etc/apache $fs/etc |
Hans-G?nter@21510 | 70 cp -a $install/etc/nagios $fs/etc |
Hans-G?nter@21510 | 71 cp -a $stuff/nagios $fs/etc/init.d |
erjo@14455 | 72 install -o root -g root -m 644 $stuff/htpasswd.users $fs/etc/nagios/ |
erjo@8330 | 73 |
Hans-G?nter@21510 | 74 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@21510 | 75 cp -a $install/usr/lib $fs/usr |
Hans-G?nter@21510 | 76 cp -a $install/usr/share $fs/usr |
erjo@8330 | 77 |
Hans-G?nter@21510 | 78 # Put documentation in a separate package |
erjo@8330 | 79 rm -rf $fs/usr/share/nagios/docs |
erjo@8330 | 80 |
Hans-G?nter@21510 | 81 # Mofify Apache config for nagvis |
erjo@8330 | 82 sed -i 's/Options None/Options FollowSymLinks/' $fs/etc/apache/conf.d/nagios.conf |
Hans-G?nter@21510 | 83 |
erjo@8700 | 84 # Fix permissions |
erjo@8700 | 85 chmod 755 $fs/usr/bin/nagios* |
erjo@8330 | 86 } |
erjo@8330 | 87 |
erjo@8330 | 88 post_install() |
erjo@8330 | 89 { |
pascal@18730 | 90 if ! grep -q nagios "$1/etc/passwd"; then |
erjo@8330 | 91 echo -n "Adding user/group nagios..." |
pascal@18730 | 92 chroot "$1/" addgroup -S nagios |
pascal@18730 | 93 chroot "$1/" adduser -S -D -H -G nagios nagios |
erjo@8330 | 94 status |
erjo@8330 | 95 fi |
erjo@8330 | 96 |
Hans-G?nter@21510 | 97 # Fix permissions for files and directories |
Hans-G?nter@21510 | 98 chroot "$1/" chown -R nagios.nagios \ |
Hans-G?nter@21510 | 99 /var/log/nagios \ |
Hans-G?nter@21510 | 100 /var/spool/nagios \ |
Hans-G?nter@21510 | 101 /var/lib/nagios \ |
Hans-G?nter@21510 | 102 /usr/share/nagios \ |
erjo@8330 | 103 /etc/nagios/* |
erjo@8330 | 104 |
pascal@18730 | 105 chmod 2775 "$1/var/lib/nagios/rw" |
pascal@18730 | 106 chroot "$1/" addgroup www nagios |
erjo@8330 | 107 |
erjo@8330 | 108 # Start Nagios daemon if we are on running system |
pascal@18730 | 109 [ "$1" ] || /etc/init.d/nagios start |
erjo@8330 | 110 |
erjo@8330 | 111 # post_install messges |
erkan@20375 | 112 echo -e "\nTo start $PACKAGE server you can run :\n" |
erjo@8330 | 113 echo "/etc/init.d/$PACKAGE start" |
erjo@8330 | 114 echo -e "Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf\n" |
erjo@8330 | 115 echo -e "Default login/password for the Web GUI is nagiosadmin/nagios" |
erjo@8330 | 116 } |
erjo@8330 | 117 |
pascal@14466 | 118 pre_remove() |
pascal@14466 | 119 { |
pascal@18730 | 120 [ "$1" ] || /etc/init.d/nagios stop |
pascal@14466 | 121 } |