wok-next view nagios/receipt @ rev 21078
Update png and Xorg in dependencies.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Dec 22 04:52:35 2018 +0200 (2018-12-22) |
parents | d5aab818505e |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="nagios"
4 VERSION="3.5.1"
5 CATEGORY="network"
6 SHORT_DESC="Host and network monitoring"
7 MAINTAINER="devel@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 BUILD_DEPENDS="libgd-dev libpng-dev libjpeg-turbo-dev libtool"
15 SPLIT="$PACKAGE-dev"
17 compile_rules() {
18 ./configure \
19 --sysconfdir=/etc/nagios \
20 --libexecdir=/usr/lib/nagios/plugins \
21 --sbindir=/usr/lib/nagios/cgi \
22 --datadir=/usr/share/nagios \
23 --localstatedir=/var/lib/nagios \
24 --with-nagios-user=nagios \
25 --with-nagios-group=nagios \
26 --with-lockfile=/var/run/nagios/nagios.pid \
27 --with-checkresult-dir=/var/spool/nagios/checkresults \
28 --with-httpd-conf=/etc/apache/conf.d \
29 $CONFIGURE_ARGS &&
30 sed -i 's!HTMLDIR=.*!HTMLDIR=/usr/share/nagios!' html/Makefile &&
32 #~ make all && make DESTDIR=$install fullinstall \
33 #~ && make DESTDIR=$install install-config
34 make all &&
35 make install &&
36 make install-config &&
37 make install-commandmode &&
38 make install-webconf &&
39 make install-classicui || return 1
41 install -Dm755 $stuff/nagios $install/etc/init.d/nagios
42 install -Dm644 $stuff/htpasswd.users $install/etc/nagios/htpasswd.users
44 cp -r include/ $install/usr/
46 mkdir -p $install/var/log/nagios
48 chown -R root:root $install
49 chmod -R g-w $install
50 chmod 755 $install/usr/bin/* # was 754
51 chmod 644 $install/usr/include/locations.h # was 600
52 }
54 genpkg_rules() {
55 case $PACKAGE in
56 nagios)
57 copy @std
58 # Fix Apache config for Nagvis
59 sed -i 's/Options None/Options FollowSymLinks/' \
60 $fs/etc/apache/conf.d/nagios.conf
62 DEPENDS="libgd libltdl apache nagios-plugins libpng \
63 libjpeg-turbo"
64 SUGGESTED="nagios-nrpe"
65 ;;
66 nagios-dev)
67 copy @dev
68 ;;
69 esac
70 }
72 post_install_nagios() {
73 if ! grep -q nagios "$1/etc/passwd"; then
74 chroot "$1/" addgroup -S nagios
75 chroot "$1/" adduser -S -D -H -G nagios nagios
76 fi
78 # Fix perms for files and directories
79 chroot "$1/" chown -R nagios.nagios \
80 /var/log/nagios \
81 /var/spool/nagios \
82 /var/lib/nagios \
83 /usr/share/nagios \
84 /etc/nagios/*
86 chmod 2775 "$1/var/lib/nagios/rw"
87 chroot "$1/" addgroup www nagios
89 # Start Nagios daemon if we are on running system
90 [ "$1" ] || /etc/init.d/nagios start
92 # post_install messages
93 [ -n "$quiet" ] || cat <<EOT
95 .--------------------------------------------------------------.
96 | To start Nagios server you can run: |
97 | /etc/init.d/nagios start |
98 | |
99 | Or add nagios to RUN_DAEMONS in /etc/rcS.conf |
100 |--------------------------------------------------------------|
101 | Default login/password for the Web GUI is nagiosadmin/nagios |
102 '--------------------------------------------------------------'
103 EOT
104 }
106 pre_remove_nagios() {
107 [ -n "$1" ] || /etc/init.d/nagios stop
108 }