|
|
@@ -33,18 +33,26 @@ Distribution: OpenPKG [EVAL]
|
|
|
Group: Network
|
|
|
License: GNU
|
|
|
Version: 1.1
|
|
|
-Release: 20030603
|
|
|
+Release: 20030625
|
|
|
+
|
|
|
+# package options
|
|
|
+%option with_fsl yes
|
|
|
|
|
|
# list of sources
|
|
|
Source0: http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-%{version}.tar.gz
|
|
|
Source1: rc.nagios
|
|
|
-Patch0: fsl.nagios
|
|
|
+Source2: fsl.nagios
|
|
|
+Patch0: nagios.patch
|
|
|
|
|
|
# build information
|
|
|
Prefix: %{l_prefix}
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
-BuildPreReq: OpenPKG, openpkg >= 20030310, gd, jpeg, png, zlib, traceroute
|
|
|
-PreReq: OpenPKG, openpkg >= 20030310, apache, traceroute
|
|
|
+BuildPreReq: OpenPKG, openpkg >= 20030415, gd, jpeg, png, zlib, traceroute
|
|
|
+PreReq: OpenPKG, openpkg >= 20030415, apache, traceroute
|
|
|
+%if "%{with_fsl}" == "yes"
|
|
|
+BuildPreReq: fsl
|
|
|
+PreReq: fsl
|
|
|
+%endif
|
|
|
AutoReq: no
|
|
|
AutoReqProv: no
|
|
|
|
|
|
@@ -55,6 +63,7 @@ AutoReqProv: no
|
|
|
|
|
|
%prep
|
|
|
%setup -q
|
|
|
+ %patch
|
|
|
|
|
|
%build
|
|
|
%{l_shtool} subst \
|
|
|
@@ -63,10 +72,14 @@ AutoReqProv: no
|
|
|
-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}" \
|
|
|
+ LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \
|
|
|
+ PERLLIBS="%{l_fsl_libs}" \
|
|
|
./configure \
|
|
|
--prefix=%{l_prefix} \
|
|
|
--with-cgiurl=%{l_prefix}/cgi/nagios \
|
|
|
@@ -90,7 +103,6 @@ AutoReqProv: no
|
|
|
%{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}/etc/fsl \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/sbin \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/nagios/rw \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/nagios \
|
|
|
@@ -165,14 +177,18 @@ AutoReqProv: no
|
|
|
-e 's;@l_susr@;%{l_susr};g' \
|
|
|
%{SOURCE rc.nagios} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
|
|
|
- # install fsl
|
|
|
+ # OSSP fake syslog library
|
|
|
+ %{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/
|
|
|
+ %{SOURCE fsl.%{name}} \
|
|
|
+ $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'
|
|
|
+ '%not %dir %{l_prefix}/etc/fsl' \
|
|
|
+ '%config %{l_prefix}/etc/fsl/fsl.%{name}'
|
|
|
|
|
|
%files -f files
|
|
|
|