| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200 |
- ##
- ## nagios.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
- ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # package information
- Name: nagios
- Summary: System and Network Monitoring
- URL: http://www.nagios.org/
- Vendor: Ethan Galstad
- Packager: The OpenPKG Project
- Distribution: OpenPKG [EVAL]
- Group: Network
- License: GNU
- Version: 1.1
- Release: 20030708
- # package options
- %option with_fsl yes
- # list of sources
- Source0: http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-%{version}.tar.gz
- Source1: rc.nagios
- Source2: fsl.nagios
- Patch0: nagios.patch
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20030415, traceroute, gcc
- PreReq: OpenPKG, openpkg >= 20030415, traceroute, apache
- BuildPreReq: gd, jpeg, png, zlib
- PreReq: gd, jpeg, png, zlib
- %if "%{with_fsl}" == "yes"
- BuildPreReq: fsl
- PreReq: fsl
- %endif
- AutoReq: no
- AutoReqProv: no
- %description
- Nagios is a system and network monitoring application. It watches
- hosts and services that you specify, alerting you when things go bad
- and when they get better.
- %prep
- %setup -q
- %patch -p0
- %build
- %{l_shtool} subst \
- -e 's;localstatedir=.\${prefix}/var.;localstatedir="'%{l_prefix}'/var/nagios";g' \
- -e 's;datadir=.\${prefix}/share.;datadir="'%{l_prefix}'/share/nagios";g' \
- -e 's;sysconfdir=.\${prefix}/etc.;sysconfdir="'%{l_prefix}'/etc/nagios";g' \
- -e 's;libexecdir=.\${prefix}/libexec.;libexecdir="'%{l_prefix}'/libexec/nagios";g' \
- configure
- %{l_shtool} subst \
- -e 's;log_file=.*;log_file=/dev/null;' \
- sample-config/nagios.cfg.in
- echo "ac_cv_path_PATH_TO_TRACEROUTE=%{l_prefix}/sbin/traceroute}" >config.cache
- CC="%{l_cc}" \
- CFLAGS="%{l_cflags -O}" \
- LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \
- PERLLIBS="%{l_fsl_libs}" \
- ./configure \
- --prefix=%{l_prefix} \
- --with-cgiurl=%{l_prefix}/cgi/nagios \
- --with-htmurl=%{l_prefix}/share/nagios \
- --with-nagios-user=%{l_musr} \
- --with-nagios-grp=%{l_mgrp} \
- --with-gd-lib=%{l_prefix}/lib \
- --with-gd-inc=%{l_prefix}/include \
- --with-lockfile=%{l_prefix}/var/nagios/nagios.lock
- %{l_make} all %{l_mflags} \
- GDLIBS="-lgd -lm -lpng -lz -ljpeg" \
- LOGDIR=%{l_prefix}/var/nagios \
- CFGDIR=%{l_prefix}/etc/nagios \
- BINDIR=%{l__prefix}/bin \
- CGIDIR=%{l_prefix}/cgi/nagios \
- HTMLDIR=%{l_prefix}/share/nagios
- %install
- rm -rf $RPM_BUILD_ROOT
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/nagios \
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
- $RPM_BUILD_ROOT%{l_prefix}/sbin \
- $RPM_BUILD_ROOT%{l_prefix}/var/nagios/rw \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/nagios \
- $RPM_BUILD_ROOT%{l_prefix}/cgi/nagios \
- $RPM_BUILD_ROOT%{l_prefix}/share/nagios/media \
- $RPM_BUILD_ROOT%{l_prefix}/share/nagios/stylesheets \
- $RPM_BUILD_ROOT%{l_prefix}/share/nagios/contexthelp \
- $RPM_BUILD_ROOT%{l_prefix}/share/nagios/docs/images \
- $RPM_BUILD_ROOT%{l_prefix}/share/nagios/images/logos \
- $RPM_BUILD_ROOT%{l_prefix}/share/nagios/ssi
- # install nagios
- %{l_shtool} install -c -s -m 755 \
- base/nagios $RPM_BUILD_ROOT%{l_prefix}/sbin/
- # install html
- %{l_shtool} install -c -m 644 \
- html/robots.txt $RPM_BUILD_ROOT%{l_prefix}/share/nagios/
- %{l_shtool} install -c -m 644 \
- html/docs/robots.txt $RPM_BUILD_ROOT%{l_prefix}/share/nagios/docs/
- %{l_shtool} install -c -m 644 \
- html/media/*.wav $RPM_BUILD_ROOT%{l_prefix}/share/nagios/media/
- %{l_shtool} install -c -m 644 \
- html/stylesheets/*.css $RPM_BUILD_ROOT%{l_prefix}/share/nagios/stylesheets/
- %{l_shtool} install -c -m 644 \
- html/contexthelp/*.html $RPM_BUILD_ROOT%{l_prefix}/share/nagios/contexthelp/
- %{l_shtool} install -c -m 644 \
- html/docs/*.html $RPM_BUILD_ROOT%{l_prefix}/share/nagios/docs/
- %{l_shtool} install -c -m 644 \
- html/docs/images/*.* $RPM_BUILD_ROOT%{l_prefix}/share/nagios/docs/images/
- %{l_shtool} install -c -m 644 \
- html/images/*.gif html/images/*.jpg html/images/*.png \
- $RPM_BUILD_ROOT%{l_prefix}/share/nagios/images/
- %{l_shtool} install -c -m 644 \
- html/images/logos/*.* $RPM_BUILD_ROOT%{l_prefix}/share/nagios/images/logos/
- # install cgis
- %{l_shtool} install -c -s -m 755 \
- cgi/*.cgi $RPM_BUILD_ROOT%{l_prefix}/cgi/nagios/
- # install sample config
- %{l_shtool} install -c -m 644 \
- sample-config/nagios.cfg $RPM_BUILD_ROOT%{l_prefix}/etc/nagios/
- %{l_shtool} install -c -m 644 \
- sample-config/cgi.cfg $RPM_BUILD_ROOT%{l_prefix}/etc/nagios/
- %{l_shtool} install -c -m 644 \
- sample-config/resource.cfg $RPM_BUILD_ROOT%{l_prefix}/etc/nagios/
- %{l_shtool} install -c -m 644 \
- sample-config/template-object/checkcommands.cfg $RPM_BUILD_ROOT%{l_prefix}/etc/nagios/
- %{l_shtool} install -c -m 644 \
- sample-config/template-object/contactgroups.cfg $RPM_BUILD_ROOT%{l_prefix}/etc/nagios/
- %{l_shtool} install -c -m 644 \
- sample-config/template-object/contacts.cfg $RPM_BUILD_ROOT%{l_prefix}/etc/nagios/
- %{l_shtool} install -c -m 644 \
- /dev/null $RPM_BUILD_ROOT%{l_prefix}/etc/nagios/dependencies.cfg
- %{l_shtool} install -c -m 644 \
- sample-config/template-object/escalations.cfg $RPM_BUILD_ROOT%{l_prefix}/etc/nagios/
- %{l_shtool} install -c -m 644 \
- sample-config/template-object/hostgroups.cfg $RPM_BUILD_ROOT%{l_prefix}/etc/nagios/
- %{l_shtool} install -c -m 644 \
- sample-config/template-object/hosts.cfg $RPM_BUILD_ROOT%{l_prefix}/etc/nagios/
- %{l_shtool} install -c -m 644 \
- sample-config/template-object/misccommands.cfg $RPM_BUILD_ROOT%{l_prefix}/etc/nagios/
- %{l_shtool} install -c -m 644 \
- sample-config/template-object/services.cfg $RPM_BUILD_ROOT%{l_prefix}/etc/nagios/
- %{l_shtool} install -c -m 644 \
- sample-config/template-object/timeperiods.cfg $RPM_BUILD_ROOT%{l_prefix}/etc/nagios/
- # install start script
- %{l_shtool} install -c -m 755 \
- -e 's;@l_prefix@;%{l_prefix};g' \
- -e 's;@l_susr@;%{l_susr};g' \
- %{SOURCE rc.nagios} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
- # install OSSP fsl configuration
- %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
- %{l_shtool} install -c -m 644 \
- -e 's;@l_prefix@;%{l_prefix};g' \
- %{SOURCE fsl.nagios} \
- $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
- %{l_files_std} \
- '%not %dir %{l_prefix}/etc/fsl' \
- '%config %{l_prefix}/etc/fsl/fsl.nagios'
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|