[icinga-checkins] icinga.org: icinga-core/tdressler/fixes: core: add compatibility include nagios.h and symlink for /usr/ include icinga in icinga.spec

git at icinga.org git at icinga.org
Sat Oct 20 15:56:56 CEST 2012


Module: icinga-core
Branch: tdressler/fixes
Commit: dcab7b821b7c5a572cbc4a50e16dea6734243952
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=dcab7b821b7c5a572cbc4a50e16dea6734243952

Author: Thomas Dressler <tdressler at tdressler.net>
Date:   Sat Oct 20 15:54:48 2012 +0200

core: add compatibility include nagios.h and symlink for /usr/include icinga in icinga.spec

refs: #3316

---

 Changelog        |    1 +
 icinga.spec      |   10 ++++++++++
 include/nagios.h |    6 ++++++
 3 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/Changelog b/Changelog
index 81be772..88c2cc6 100644
--- a/Changelog
+++ b/Changelog
@@ -210,6 +210,7 @@ classic ui: Added/Changed cgi.cfg options
 
 * icinga.spec: add devel package #2634
 * icinga.spec: forced update on icinga.cfg change package locations #2923
+* icinga.spec: add nagios include symlink #3316 - TD
 
 
 
diff --git a/icinga.spec b/icinga.spec
index d253442..2e29852 100644
--- a/icinga.spec
+++ b/icinga.spec
@@ -302,6 +302,16 @@ if [ $1 -eq 0 ]; then
     /sbin/chkconfig --del ido2db
 fi
 
+%post devel
+#add compatibility symlink for nagios
+if [ ! -e %{_includedir}/nagios ] ; then
+	ln -s %{_includedir}/%{name} %{_includedir}/nagios
+fi 
+
+%postun devel
+if [ "$(readlink %{_includedir}/nagios)" = "%{_includedir}/%{name}" ]; then
+	rm %{_includedir}/nagios
+fi
 
 %clean
 %{__rm} -rf %{buildroot}
diff --git a/include/nagios.h b/include/nagios.h
new file mode 100644
index 0000000..76c8950
--- /dev/null
+++ b/include/nagios.h
@@ -0,0 +1,6 @@
+#ifndef _NAGIOS_H
+#define _NAGIOS_H
+
+#include <icinga/icinga.h>
+#endif
+





More information about the icinga-checkins mailing list