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