Sync from SUSE:SLFO:Main nagios-rpm-macros revision a911087cc73b87e04465861110d43754

This commit is contained in:
Adrian Schröter 2024-05-03 16:55:32 +02:00
commit 47b49e6e0b
11 changed files with 620 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

47
macros.check_mk Normal file
View File

@ -0,0 +1,47 @@
#
# directories and files for check_mk
#
# place for livestatus.o libdir
%livestatus_libdir %{_prefix}/lib/check_mk
#
%livestatus_socketdir %{_var}/spool/check_mk
#
%livestatus_datadir %{_datadir}/check_mk
# confdir
%livestatus_sysconfdir %{_sysconfdir}/check_mk
# vardir
%livestatus_vardir %{_var}/lib/check_mk
# livesock
%livestatus_socket_file %{livestatus_socketdir}/livestatus.cmd
# livebackendsdir
%livestatus_livebackendsdir %{livestatus_datadir}/livestatius
# check_mk_configdir
%livestatus_check_mk_configdir %{livestatus_sysconfdir}/conf.d
# check_mk-docdir (man pages of checks)
%livestatus_check_mk_checks_mandir %{_defaultdocdir}/check_mk/checks
# agentsdir
%livestatus_agentsdir %{livestatus_datadir}/agents
# checksdir
%livestatus_checksdir %{livestatus_datadir}/checks
# modulesdir
%livestatus_modulesdir %{livestatus_datadir}/modules
# notificationsdir
%livestatus_notificationsdir %{livestatus_datadir}/notifications
# web_dir
%livestatus_webdir %{livestatus_datadir}/web
# agentslibdir
%livestatus_agentslibdir %{_prefix}/lib/check_mk_agent
# agentsconfdir
%livestatus_agentsconfdir %{livestatus_sysconfdir}
# htdocsdir
%livestatus_htdocsdir %{nagios_datadir}
# htdocsdir for icinga
%livestatus_icinga_htdocsdir %{icinga_datadir}
# nagconfdir
%livestatus_nagconfdir %{nagios_sysconfdir}/check_mk.d
# nagconfdir for icinga
%livestatus_icinga_confdir %{icinga_sysconfdir}/check_mk.d
# rrddir
%livestatus_rrddir %{livestatus_libdir}/rrd
# log_dir
%livestatus_log_dir %{_var}/log/check_mk

98
macros.icinga Normal file
View File

@ -0,0 +1,98 @@
# macros.icinga file
# macros for Icinga (sub-)package building - handle with care
#
#
# directories
#
# install all plugins into this directory
# Please note: we use the old Nagios directory here, as plugins are
# currently compatible
%icinga_plugindir %{_prefix}/lib/nagios/plugins
# install all event handler scripts into this directory
%icinga_eventhandlerdir %{_prefix}/lib/icinga/eventhandler
# files like p1.pl are located directly in this directory
%icinga_libdir %{_prefix}/lib/icinga
# Icinga uses this directory for status files
%icinga_localstatedir %{_var}/lib/icinga
# Icinga configuration should be stored here
%icinga_sysconfdir %{_sysconfdir}/icinga
# Icinga static webpages, stylesheets and theme(s), online documentation
%icinga_datadir %{_datadir}/icinga
# Icinga spool dir
%icinga_spooldir %{_var}/spool/icinga
# Icinga run dir
%icinga_rundir %{_rundir}/icinga
# Icinga logfile dir
%icinga_logdir %{_var}/log/icinga
# Icinga cgi directory
%icinga_cgidir %{_prefix}/lib/icinga/cgi
# Icinga cgi logging directory
%icinga_cgi_logdir %{icinga_logdir}/www
# Icinga check results spool directory
%icinga_checkresultdir %{icinga_spooldir}/checkresults
# Icinga external command file directory
%icinga_cmd_filedir %{icinga_rundir}
# Icinga temp directory
%icinga_tempdir %{icinga_rundir}/tmp
#
# files
#
# This is where the current status of all monitored services and
# hosts is stored
%icinga_status_file %{icinga_spooldir}/status.dat
# This is the file that Icinga should use to store host and
# service state information before it shuts down.
%icinga_state_retention_file %{icinga_spooldir}/retention.dat
# Icinga lock file
%icinga_lockfile %{icinga_rundir}/icinga.pid
# Icinga ido2db lock file
%icinga_ido2db_lockfile %{icinga_rundir}/ido2db.pid
# Icinga external command file - the name icinga.cmd is static, only the
# directory is configurable
%icinga_cmdfile %{icinga_cmd_filedir}/icinga.cmd
%icinga_command_file %{icinga_cmdfile}
# Icinga ido2db socket file
%icinga_ido2db_socketfile %{icinga_rundir}/ido2db.sock
# Icinga initscript error file
%icinga_chkfile %{icinga_spooldir}/icinga.chk
# Icinga idomod tmp file
%icinga_idomod_tmpfile %{icinga_spooldir}/idomod.tmp
# Icinga HTTP auth file
%icinga_http_authfile %{icinga_sysconfdir}/htpasswd.users
# Icinga logrotate file
%icinga_logrotatefile %{_sysconfdir}/logrotate.d/icinga
# Icinga temp file
%icinga_tempfile %{icinga_rundir}/icinga.tmp
#
# users and groups
#
# User, Icinga runs under
%icinga2_user icinga
# Group, Icinga runs under
%icinga2_group icinga
# User, that can execute commands via %{icinga_command_file}
%icinga2_command_user wwwrun
# Group, that can execute commands via %{icinga_command_file}
%icinga2_command_group icingacmd
# Add Icinga user and groups
%icinga2_user_group_add() \
/usr/sbin/groupadd -r %{icinga2_group} 2>/dev/null || :\
/usr/sbin/useradd -r -g %{icinga2_group} -d %{icinga2_localstatedir} -s /bin/false -c "User for Icinga" %{icinga2_user} 2>/dev/null || :\
%{nil}
%icinga2_command_user_group_add() \
/usr/sbin/groupadd -r %{icinga2_command_group} 2>/dev/null || :\
%if 0%{?suse_version} > 01220 \
/usr/sbin/usermod -a -G %{icinga2_command_group} %{icinga2_user} || :\
%else \
/usr/sbin/groupmod -A %{icinga2_user} %{icinga2_command_group} 2>/dev/null || :\
%endif \
%{nil}

100
macros.icinga2 Normal file
View File

@ -0,0 +1,100 @@
# macros.icinga file
# macros for Icinga (sub-)package building - handle with care
#
#
# directories
#
# install all plugins into this directory
# Please note: we use the old Nagios directory here, as plugins are
# currently compatible
%icinga2_plugindir %{_prefix}/lib/nagios/plugins
# install all event handler scripts into this directory
%icinga2_eventhandlerdir %{_prefix}/lib/icinga/eventhandler
# files like p1.pl are located directly in this directory
%icinga2_libdir %{_prefix}/lib/icinga2
# Icinga uses this directory for status files
%icinga2_localstatedir %{_var}/lib/icinga2
# Icinga configuration should be stored here
%icinga2_sysconfdir %{_sysconfdir}/icinga2
# Icinga static webpages, stylesheets and theme(s), online documentation
%icinga2_datadir %{_datadir}/icinga2
# Icinga spool dir
%icinga2_spooldir %{_var}/spool/icinga2
# Icinga run dir
%icinga2_rundir %{_rundir}/icinga2
# Icinga logfile dir
%icinga2_logdir %{_var}/log/icinga2
# Icinga cgi directory
%icinga2_cgidir %{_prefix}/lib/icinga2/cgi
# Icinga cgi logging directory
%icinga2_cgi_logdir %{icinga2_logdir}/www
# Icinga check results spool directory
%icinga2_checkresultdir %{icinga2_spooldir}/checkresults
# Icinga external command file directory
%icinga2_cmd_filedir %{icinga2_rundir}
# Icinga temp directory
%icinga2_tempdir %{icinga2_rundir}/tmp
#
# files
#
# This is where the current status of all monitored services and
# hosts is stored
%icinga2_status_file %{icinga2_spooldir}/status.dat
# This is the file that Icinga should use to store host and
# service state information before it shuts down.
%icinga2_state_retention_file %{icinga2_spooldir}/retention.dat
# Icinga lock file
%icinga2_lockfile %{icinga2_rundir}/icinga2.pid
# Icinga ido2db lock file
%icinga2_ido2db_lockfile %{icinga2_rundir}/ido2db.pid
# Icinga external command file - the name icinga.cmd is static, only the
# directory is configurable
%icinga2_cmdfile %{icinga2_cmd_filedir}/icinga2.cmd
%icinga2_command_file %{icinga2_cmdfile}
# Icinga ido2db socket file
%icinga2_ido2db_socketfile %{icinga2_rundir}/ido2db.sock
# Icinga initscript error file
%icinga2_chkfile %{icinga2_spooldir}/icinga2.chk
# Icinga idomod tmp file
%icinga2_idomod_tmpfile %{icinga_spooldir}/idomod.tmp
# Icinga HTTP auth file
%icinga2_http_authfile %{icinga_sysconfdir}/htpasswd.users
# Icinga logrotate file
%icinga2_logrotatefile %{_sysconfdir}/logrotate.d/icinga2
# Icinga temp file
%icinga2_tempfile %{icinga2_rundir}/icinga2.tmp
#
# users and groups
#
# User, Icinga runs under
%icinga_user icinga
# Group, Icinga runs under
%icinga_group icinga
# Group, Icingaweb2 runs under
%icinga_webgroup icingaweb2
# User, that can execute commands via %{icinga_command_file}
%icinga_command_user wwwrun
# Group, that can execute commands via %{icinga_command_file}
%icinga_command_group icingacmd
# Add Icinga user and groups
%icinga_user_group_add() \
/usr/sbin/groupadd -r %{icinga_group} 2>/dev/null || :\
/usr/sbin/useradd -r -g %{icinga_group} -d %{icinga_localstatedir} -s /bin/false -c "User for Icinga" %{icinga_user} 2>/dev/null || :\
%{nil}
%icinga_command_user_group_add() \
/usr/sbin/groupadd -r %{icinga_command_group} 2>/dev/null || :\
%if 0%{?suse_version} > 01220 \
/usr/sbin/usermod -a -G %{icinga_command_group} %{icinga_user} || :\
%else \
/usr/sbin/groupmod -A %{icinga_user} %{icinga_command_group} 2>/dev/null || :\
%endif \
%{nil}

78
macros.nagios Normal file
View File

@ -0,0 +1,78 @@
# macros.nagios file
# macros for Nagios and Icinga (sub-)package building - handle with care
#
#
# directories
#
# install all plugins into this directory
%nagios_plugindir %{_prefix}/lib/nagios/plugins
# install all event handler scripts into this directory
%nagios_eventhandlerdir %{_prefix}/lib/nagios/plugins/eventhandler
# files like p1.pl are located directly in this directory
%nagios_libdir %{_prefix}/lib/nagios
# Nagios uses this directory for status files
%nagios_localstatedir %{_var}/lib/nagios
# Nagios configuration should be stored here
%nagios_sysconfdir %{_sysconfdir}/nagios
# Nagios static webpages, stylesheets and theme(s), online documentation
%nagios_datadir %{_datadir}/nagios
# Nagios spool dir (checkresult-dir)
%nagios_spooldir %{_var}/spool/nagios
# Nagios logfile dir
%nagios_logdir %{_var}/log/nagios
# Nagios cgi directory
%nagios_cgidir %{_prefix}/lib/nagios/cgi
#
# NRPE
#
%nrpe_sysconfdir %{_sysconfdir}/nrpe.d
#
# Monitoring Plugins
#
%plugin_confdir %{_sysconfdir}/monitoring-plugins
#
# files
#
# This is the file that Nagios checks for external command requests
%nagios_command_file %{_var}/spool/nagios/nagios.cmd
# This is where the current status of all monitored services and
# hosts is stored.
%nagios_status_file %{_var}/lib/nagios/status.dat
# This is the file that Nagios should use to store host and
# service state information before it shuts down.
%nagios_state_retention_file %{_var}/lib/nagios/retention.dat
#
# users and groups
#
# User, Nagios runs under
%nagios_user nagios
# Group, Nagios runs under
%nagios_group nagios
# User, that can execute commands via %{nagios_command_file}
%nagios_command_user wwwrun
# Group, that can execute commands via %{nagios_command_file}
%nagios_command_group nagcmd
# Add Nagios user and groups
%nagios_user_group_add() \
/usr/sbin/groupadd -r %{nagios_group} 2>/dev/null || :\
/usr/sbin/useradd -r -g %{nagios_group} -d %{nagios_localstatedir} -s /bin/false -c "User for Nagios" %{nagios_user} 2>/dev/null || :\
%{nil}
%nagios_command_user_group_add() \
/usr/sbin/groupadd -r %{nagios_command_group} 2>/dev/null || :\
%if 0%{?suse_version} > 01220 \
/usr/sbin/usermod -a -G %{nagios_command_group} %{nagios_user} || :\
%else \
/usr/sbin/groupmod -A %{nagios_user} %{nagios_command_group} 2>/dev/null || :\
%endif \
%{nil}

2
macros.nagiosgrapher Normal file
View File

@ -0,0 +1,2 @@
# used at least by nagios-plugins-traffic_limit
%nagiosgrapher_sysconfdir %{nagios_sysconfdir}/ngraph.d

14
macros.pnp4nagios Normal file
View File

@ -0,0 +1,14 @@
#
# directories and files for pnp4nagios
#
# directory containing template files for pnp
%pnp4nagios_baseurl /pnp
%pnp4nagios_datarootdir %{_datadir}/pnp4nagios
%pnp4nagios_datadir %{_datadir}/pnp4nagios
%pnp4nagios_logdir %{_var}/log/pnp4nagios
%pnp4nagios_libdir %{_var}/lib/pnp4nagios
%pnp4nagios_perfdata_dir %{_var}/lib/pnp4nagios/perfdata
%pnp4nagios_perfdata_logfile %{_var}/log/pnp4nagios/perfdata.log
%pnp4nagios_perfdata_spooldir %{_var}/spool/pnp4nagios
%pnp4nagios_sysconfdir %{_sysconfdir}/pnp4nagios
%pnp4nagios_templatedir %{_datadir}/pnp4nagios/templates

30
nagios-rpm-macros-COPYING Normal file
View File

@ -0,0 +1,30 @@
Copyright (c) 2011, Lars Vogdt
All rights reserved.
This package is made available under the following terms:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the Novell nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS 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 COPYRIGHT OWNER OR 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.

19
nagios-rpm-macros-README Normal file
View File

@ -0,0 +1,19 @@
Hi Packager!
This package contains some RPM macros for building packages that
make use of some nagios directories or files that ship with
the nagios package.
Please have a look at the file in /etc/rpm/macros.nagios to
get an overview and description of the macros.
Just use the following line in your package to make use of the
macros:
BuildRequires: nagios-rpm-macros
No need to add this package also as required package - users
do not need this package, as all macros are just used during
package build.
...and remember to have a lot of fun!

140
nagios-rpm-macros.changes Normal file
View File

@ -0,0 +1,140 @@
-------------------------------------------------------------------
Fri Oct 15 18:22:54 UTC 2021 - Andrew Daugherity <adaugherity@tamu.edu>
- unbreak build on SLES 12 & RHEL 7 (_rpmmacrodir not set)
-------------------------------------------------------------------
Fri Jun 11 12:02:11 UTC 2021 - Dominique Leuenberger <dimstar@opensuse.org>
- Move macros.nagios from /etc/rpm to %{_rpmmacrodir}
(boo#1185657).
-------------------------------------------------------------------
Sat Nov 25 11:03:37 UTC 2017 - ecsos@opensuse.org
- update to 0.14
+ added %icinga_webgroup for icingaweb2 and their modules
-------------------------------------------------------------------
Sun Jul 26 10:08:19 UTC 2015 - lars@linux-schulserver.de
- update to 0.13:
+ added %plugin_confdir pointing to /etc/monitoring-plugins
-------------------------------------------------------------------
Mon Mar 9 14:27:44 UTC 2015 - lars@linux-schulserver.de
- update to 0.12:
+ added livestatus_log_dir
-------------------------------------------------------------------
Sat Dec 13 17:08:08 UTC 2014 - lars@linux-schulserver.de
- update to 0.11:
+ added %%{livestatus_check_mk_checks_mandir} for man pages of
additional check_mk checks
-------------------------------------------------------------------
Mon Jun 23 14:24:20 UTC 2014 - thardeck@suse.com
- update to 0.10:
+ adapt icinga[2] macros to use /run instead of /var/run on modern systems
+ this change can easily be used for other macros, just use %{_rundir} instead of "%{_localstatedir}/run"
-------------------------------------------------------------------
Tue Apr 15 18:08:12 UTC 2014 - lars@linux-schulserver.de
- update to 0.09:
+ added macros.icinga2
-------------------------------------------------------------------
Tue Sep 10 17:11:47 UTC 2013 - lars@linux-schulserver.de
- adapt check_mk directories for icinga usage
-------------------------------------------------------------------
Wed Aug 7 20:56:02 UTC 2013 - lars@linux-schulserver.de
- added new macros:
+ %icinga_user_group_add
+ %icinga_command_user_group_add
to make it easier to have the same useradd/groupadd invocations
in all packages
-------------------------------------------------------------------
Thu Apr 11 11:17:39 UTC 2013 - obs@botter.cc
- add additional check_mk path (since 1.2.2) to macros.check_mk
+ %livestatus_notificationsdir
-------------------------------------------------------------------
Wed Mar 13 15:57:04 UTC 2013 - lars@linux-schulserver.de
- general update for 12.1, 12.2 and 12.3 for bnc#809180
-------------------------------------------------------------------
Sun Mar 10 21:21:55 UTC 2013 - lars@linux-schulserver.de
- added icinga_tempdir and icinga_tempfile
-------------------------------------------------------------------
Tue Jan 1 14:40:45 UTC 2013 - lars@linux-schulserver.de
Update to 0.06:
- added new macros:
+ %nagios_user_group_add
+ %nagios_command_user_group_add
to make it easier to have the same useradd/groupadd invocations
in all packages
-------------------------------------------------------------------
Fri Aug 17 15:02:35 UTC 2012 - thardeck@suse.com
- readded status.dat and retention.dat paths
-------------------------------------------------------------------
Tue May 29 14:14:26 UTC 2012 - thardeck@suse.com
- added additional Icinga paths for Icinga 1.7
-------------------------------------------------------------------
Fri Feb 17 12:39:10 UTC 2012 - thardeck@suse.com
- added additional Icinga paths
-------------------------------------------------------------------
Tue Feb 7 09:25:23 UTC 2012 - lars@linux-schulserver.de
- added macros.icinga
-------------------------------------------------------------------
Wed Dec 7 15:42:27 UTC 2011 - lars@linux-schulserver.de
- added macros.nagiosgrapher
-------------------------------------------------------------------
Tue Nov 29 13:25:23 UTC 2011 - lars@linux-schulserver.de
- added %pnp4nagios_libdir
-------------------------------------------------------------------
Sat Nov 5 16:03:58 UTC 2011 - lars@linux-schulserver.de
- added first set of macros for check_mk aka livestatus
- added first set of macros for pnp4nagios
-------------------------------------------------------------------
Tue Nov 1 12:55:27 UTC 2011 - lars@linux-schulserver.de
- added %nagios_libdir
-------------------------------------------------------------------
Tue Nov 1 12:18:55 UTC 2011 - lars@linux-schulserver.de
- add BSD like COPYING file to fix bnc#727044
-------------------------------------------------------------------
Fri Jul 29 20:11:25 UTC 2011 - lars@linux-schulserver.de
- initial version for openSUSE

69
nagios-rpm-macros.spec Normal file
View File

@ -0,0 +1,69 @@
#
# spec file for package nagios-rpm-macros
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: nagios-rpm-macros
Version: 0.14
Release: 0
Summary: RPM Macros for Nagios based packages
License: BSD-3-Clause
Group: System/Monitoring
URL: http://en.opensuse.org/Nagios
Source0: macros.nagios
Source1: %{name}-README
Source2: nagios-rpm-macros-COPYING
Source3: macros.check_mk
Source4: macros.pnp4nagios
Source5: macros.nagiosgrapher
Source6: macros.icinga
Source7: macros.icinga2
BuildArch: noarch
# _rpmmacrodir doesn't exist on SLES 12 or RHEL 7
%if %{undefined _rpmmacrodir}
%define _rpmmacrodir %{_rpmconfigdir}/macros.d
%endif
%description
This package provides rpm macros for building packages for
Nagios, check_mk and/or Icinga.
%prep
cp %{SOURCE1} README
cp %{SOURCE2} COPYING
%build
%install
install -Dm644 %{SOURCE0} %{buildroot}%{_rpmmacrodir}/macros.nagios
cat %{SOURCE3} >> %{buildroot}%{_rpmmacrodir}/macros.nagios
cat %{SOURCE4} >> %{buildroot}%{_rpmmacrodir}/macros.nagios
cat %{SOURCE5} >> %{buildroot}%{_rpmmacrodir}/macros.nagios
cat %{SOURCE6} >> %{buildroot}%{_rpmmacrodir}/macros.nagios
cat %{SOURCE7} >> %{buildroot}%{_rpmmacrodir}/macros.nagios
# make sure that _rundir is working on older systems
%if ! %{defined _rundir}
sed -i 's|%%{_rundir}|%%{_localstatedir}/run|' %{buildroot}%{_rpmmacrodir}/macros.nagios
%endif
%files
%license COPYING
%doc README
%{_rpmmacrodir}/macros.nagios
%changelog