[packages/doxygen] - allow building without doc

hawk hawk at pld-linux.org
Tue Mar 1 20:19:31 CET 2022


commit 69b72b24cde5855cdfc256189a9db13fbd95182e
Author: Marcin Krol <hawk at tld-linux.org>
Date:   Tue Mar 1 20:19:12 2022 +0100

    - allow building without doc

 doxygen.spec | 25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)
---
diff --git a/doxygen.spec b/doxygen.spec
index f5f5479..92a85e1 100644
--- a/doxygen.spec
+++ b/doxygen.spec
@@ -1,6 +1,7 @@
 # NOTE: on upgrades, beware of texlive features available in PLD
 #
 # Conditional build:
+%bcond_without	doc	# without doc
 %bcond_without	qt	# without doxywizard (qt-based)
 %bcond_without	xapian	# without doxysearch (xapian based)
 #
@@ -34,11 +35,11 @@ BuildRequires:	ghostscript-fonts-std
 BuildRequires:	libpng-devel
 BuildRequires:	libstdc++-devel
 BuildRequires:	perl-base
-BuildRequires:	python >= 2
+BuildRequires:	python3
 %{?with_qt:BuildRequires:	qt4-build >= 4.3}
 %{?with_qt:BuildRequires:	qt4-qmake >= 4.3}
-BuildRequires:	texlive-latex
-BuildRequires:	texlive-pdftex
+%{?with_doc:BuildRequires:	texlive-latex}
+%{?with_doc:BuildRequires:	texlive-pdftex}
 %{?with_xapian:BuildRequires:	xapian-core-devel}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -189,13 +190,15 @@ install -d build
 cd build
 %cmake .. \
 	-DBUILD_SHARED_LIBS=OFF \
-	-Dbuild_doc=ON \
+	%{?with_doc:-Dbuild_doc=ON} \
 	%{?with_xapian:-Dbuild_search=ON} \
 	%{?with_qt:-Dbuild_wizard=ON}
 
 %{__make}
 
+%if %{with doc}
 %{__make} docs
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -206,12 +209,24 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_examplesdir}
 cp -pr examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
+%if !%{with doc}
+install -d $RPM_BUILD_ROOT%{_mandir}/man1
+install -c -m 644 doc/doxygen.1 $RPM_BUILD_ROOT%{_mandir}/man1
+%if %{with xapian}
+install -c -m 644 doc/doxyindexer.1 $RPM_BUILD_ROOT%{_mandir}/man1
+install -c -m 644 doc/doxysearch.1 $RPM_BUILD_ROOT%{_mandir}/man1
+%endif
+%if %{with qt}
+%endif
+install -c -m 644 doc/doxywizard.1 $RPM_BUILD_ROOT%{_mandir}/man1
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc README.md build/html
+%doc README.md %{?with_doc:build/html}
 %attr(755,root,root) %{_bindir}/doxygen
 %{_examplesdir}/%{name}-%{version}
 %{_mandir}/man1/doxygen.1*
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/doxygen.git/commitdiff/69b72b24cde5855cdfc256189a9db13fbd95182e



More information about the pld-cvs-commit mailing list