Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
>
nagios-ndoutils
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 7
[-]
[+]
Changed
ndoutils.spec
@@ -8,18 +8,18 @@ # norootforbuild Name: ndoutils -Summary: Nagios v3.x Data Output Utilities +Summary: Nagios v2.x/v3.x Data Output Utilities Version: 1.4b7 Release: 1 Url: http://www.nagios.org/ License: GPL v2 or later Group: System/Monitoring AutoReqProv: on -Source0: %name-%version.tar.bz2 -Source1: %name-init +Source0: %{name}-%{version}.tar.bz2 +Source1: %{name}-init Source2: ndoutils-README.SuSE Patch: ndoutils-1.4b7-libpq-fe-include.patch -Requires: nagios >= 3.0 +Requires: nagios >= 2.0 PreReq: mysql %if 0%{?suse_version} > 1020 BuildRequires: libmysqlclient-devel @@ -28,11 +28,11 @@ %endif # postgresql is currently not supported but will likely be added in the future BuildRequires: postgresql-devel -BuildRequires: nagios-devel >= 3.0 +BuildRequires: nagios-devel >= 2.0 BuildRequires: tcpd BuildRoot: %_tmppath/%name-%version-build -%define libexecdir %_prefix/lib/nagios/plugins -%define nsusr nagios +%define libexecdir %_prefix/lib/nagios/plugins +%define nsusr nagios %define nsgrp nagios %description @@ -48,7 +48,7 @@ %prep %setup -q %patch -install -m644 %{SOURCE2} README.SuSE +%__install -m644 %{S:2} README.SuSE %build %configure \ @@ -63,35 +63,35 @@ %__make %{?jobs:-j%jobs} %install -install -d %buildroot%_sysconfdir/init.d -install -d %buildroot%_sysconfdir/nagios -install -d %buildroot%_sbindir -install -d %buildroot%_bindir -install -d %buildroot%_prefix/lib/nagios/brokers -install -d %buildroot%_localstatedir/ndo - -install -d %_builddir/%name-%version/examples - -install -m0755 src/ndo2db-3x %buildroot%_sbindir/ndo2db -install -m0755 src/file2sock %buildroot%_bindir/file2sock -install -m0755 src/log2ndo %buildroot%_bindir/log2ndo -install -m0755 src/sockdebug %buildroot%_bindir/sockdebug -install -m0755 src/ndomod-3x.o %buildroot%_prefix/lib/nagios/brokers/ndomod.o -install -m0755 %{S:1} %buildroot%_sysconfdir/init.d/ndo2db -ln -s %_sysconfdir/init.d/ndo2db %buildroot%_sbindir/rcndo2db +%__install -d %{buildroot}%{_sysconfdir}/init.d +%__install -d %{buildroot}%{_sysconfdir}/nagios +%__install -d %{buildroot}%{_sbindir} +%__install -d %{buildroot}%{_bindir} +%__install -d %{buildroot}%{_prefix}/lib/nagios/brokers +%__install -d %{buildroot}%{_localstatedir}/ndo + +%__install -d %_builddir/%name-%version/examples + +%__install -m0755 src/ndo2db-3x %{buildroot}%{_sbindir}/ndo2db +%__install -m0755 src/file2sock %{buildroot}%{_bindir}/file2sock +%__install -m0755 src/log2ndo %{buildroot}%{_bindir}/log2ndo +%__install -m0755 src/sockdebug %{buildroot}%{_bindir}/sockdebug +%__install -m0755 src/ndomod-3x.o %{buildroot}%{_prefix}/lib/nagios/brokers/ndomod.o +%__install -m0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/ndo2db +%__ln -s %_sysconfdir/init.d/ndo2db %{buildroot}%{_sbindir}/rcndo2db # # fix path names in config # -# install -m0644 config/ndo2db.cfg %buildroot%_sysconfdir/nagios/ndo2db.cfg -sed -e "s@^socket_name=.*@socket_name=/var/spool/nagios/ndo.sock@g" \ - -e "s@^debug_file=.*@debug_file=/var/log/nagios/ndo2db.debug@g" config/ndo2db.cfg > %buildroot%_sysconfdir/nagios/ndo2db.cfg - -# install -m0644 config/ndomod.cfg %buildroot%_sysconfdir/nagios/ndomod.cfg -sed -e "s@^output=.*@output=/var/spool/nagios/ndo.sock@g" \ - -e "s@^buffer_file=.*@buffer_file=/var/spool/nagios/ndomod.tmp@g" config/ndomod.cfg > %buildroot%_sysconfdir/nagios/ndomod.cfg +# install -m0644 config/ndo2db.cfg %{buildroot}%_sysconfdir/nagios/ndo2db.cfg +%__sed -e "s@^socket_name=.*@socket_name=/var/spool/nagios/ndo.sock@g" \ + -e "s@^debug_file=.*@debug_file=/var/log/nagios/ndo2db.debug@g" config/ndo2db.cfg > %{buildroot}%{_sysconfdir}/nagios/ndo2db.cfg + +# install -m0644 config/ndomod.cfg %{buildroot}%_sysconfdir/nagios/ndomod.cfg +%__sed -e "s@^output=.*@output=/var/spool/nagios/ndo.sock@g" \ + -e "s@^buffer_file=.*@buffer_file=/var/spool/nagios/ndomod.tmp@g" config/ndomod.cfg > %{buildroot}%{_sysconfdir}/nagios/ndomod.cfg -cat > %_builddir/%name-%version/config/nagios.cfg << EOF +%__cat > %{_builddir}/%{name}-%{version}/config/nagios.cfg << EOF # SAMPLE NAGIOS CONFIG SNIPPET FOR NDOMOD # # In order to have Nagios run the NDOMOD event broker module, you'll need @@ -102,7 +102,7 @@ #broker_module=%{_prefix}/lib/nagios/brokers/ndomod.o config_file=%{_sysconfdir}/nagios/ndo2db.cfg EOF -cat > %_builddir/%name-%version/config/misccommands.cfg << EOF +%__cat > %_builddir/%{name}-%{version}/config/misccommands.cfg << EOF # SAMPLE NDO FILE ROTATION COMMAND # # This is an example Nagios command definition that can be used to @@ -118,7 +118,7 @@ %clean -rm -rf %buildroot +%__rm -rf %{buildroot} @@ -129,12 +129,16 @@ %config(noreplace) %{_sysconfdir}/nagios/ndomod.cfg %config(noreplace) %{_sysconfdir}/nagios/ndo2db.cfg %attr(0755,%{nsusr},%{nsgrp}) %dir %{_localstatedir}/ndo -%_sysconfdir/init.d/ndo2db -%_bindir/file2sock -%_bindir/log2ndo -%_bindir/sockdebug -%_sbindir/ndo2db -%_sbindir/rcndo2db -%_prefix/lib/nagios/brokers/ndomod.o +%{_sysconfdir}/init.d/ndo2db +%{_bindir}/file2sock +%{_bindir}/log2ndo +%{_bindir}/sockdebug +%{_sbindir}/ndo2db +%{_sbindir}/rcndo2db +%{_prefix}/lib/nagios/brokers/ndomod.o %changelog +* Wed May 07 2008 Carsten Schoene <cs@linux-administrator.com> +- initial import +- replaced some commands with macros +- added brackets to all macros