From acd5f253ce7f0227afa245bded1b36ea0bf81143 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 2 Oct 2013 14:03:17 +0300 Subject: [PATCH] build html documentation --- nagios.spec | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/nagios.spec b/nagios.spec index 36a603b..4d2233f 100644 --- a/nagios.spec +++ b/nagios.spec @@ -3,6 +3,7 @@ # # Conditional build: %bcond_without gd # without statusmap and trends, which require gd library +%bcond_without doc # don't build html docs # reeenable when http://tracker.nagios.org/view.php?id=51 is fixed %bcond_with tests @@ -44,6 +45,7 @@ Patch11: do-not-fetch-rss.patch URL: http://www.nagios.org/ BuildRequires: autoconf BuildRequires: automake +%{?with_doc:BuildRequires: doxygen} BuildRequires: rpmbuild(macros) >= 1.268 BuildRequires: sed >= 4.0 %if %{with gd} @@ -174,6 +176,9 @@ generate the data. %package doc Summary: HTML Documentation for Nagios Group: Documentation +%if "%{_rpmversion}" >= "5" +BuildArch: noarch +%endif # does not require base %description doc @@ -273,11 +278,6 @@ sed -e 's,%{_prefix}/lib/,%{_libdir}/,' %{SOURCE5} > lighttpd.conf s,=nagiosadmin,=*,g ' sample-config/*.cfg.in -# fixup paths in doc -#%{__sed} -i -e ' -# s,/usr/local/%{name}/var/archives/,/var/log/%{name}/archives/, -#' html/docs/configmain.html - #rm t/611cgistatus-hosturgencies.t %build @@ -309,6 +309,8 @@ cd .. %{__make} all +%{?with_doc:%{__make} dox} + %{?with_tests:%{__make} test} %install @@ -365,7 +367,7 @@ done > $RPM_BUILD_ROOT%{_localstatedir}/rw/%{name}.qh install -d $RPM_BUILD_ROOT%{_docdir}/%{name} -mv $RPM_BUILD_ROOT{%{htmldir}/docs/*,%{_docdir}/%{name}} +%{__cp} -a Documentation/html/* $RPM_BUILD_ROOT%{_docdir}/%{name} %clean rm -rf $RPM_BUILD_ROOT -- 2.44.0