From 8f6d519a6270960b5d9cb6939c02bf17295c1095 Mon Sep 17 00:00:00 2001 From: Bruno Cornec Date: Mon, 15 Feb 2016 02:06:24 +0100 Subject: [PATCH] - doc management in .spec - Build documentation (pdf and singlehtml) - Install documentation (that should become a separate script to be called) - Adds files generated in the list of files managed by rpm --- pbconf/python-redfish/rpm/python-redfish.spec | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/pbconf/python-redfish/rpm/python-redfish.spec b/pbconf/python-redfish/rpm/python-redfish.spec index 22e4e5b..5ae762b 100644 --- a/pbconf/python-redfish/rpm/python-redfish.spec +++ b/pbconf/python-redfish/rpm/python-redfish.spec @@ -23,21 +23,39 @@ PBDESC %build %{__python} setup.py build +# Deal with doc +cd doc +make man +make singlehtml +make latexpdf %install %{__python} setup.py install -O1 --skip-build --root %{buildroot} +# This will go in a separate script later on to share with other distros %{__mkdir} -p %{buildroot}/%{_bindir} install -m 755 redfish-client/redfish-client.py %{buildroot}/%{_bindir}/redfish-client rm -fr %{buildroot}/%{python_sitelib}/redfish/old +for i in 1; do + mkdir -p %{buildroot}/%{_mandir}/man$i + install -m 644 doc/build/man/*.$i %{buildroot}/%{_mandir}/man$i +done +install -d 755 %{buildroot}/%{_docdir}/%{name}/html/_static +install -m 644 doc/build/singlehtml/*.html %{buildroot}/%{_docdir}/%{name}/html +install -m 644 doc/build/singlehtml/_static/* %{buildroot}/%{_docdir}/%{name}/html/_static + %files %doc README.rst examples/[a-z]*.py LICENSE +%doc doc/build/latex/*.pdf %dir %{python_sitelib}/redfish +%dir %{_docdir}/%{name}/html +%{_docdir}/%{name}/html/*.html +%dir %{_docdir}/%{name}/html/_static +%{_docdir}/%{name}/html/_static/* %{_bindir}/redfish-client %{python_sitelib}/redfish/*.py* %{python_sitelib}/redfish/tests/*.py* %{python_sitelib}/python_redfish* - +%{_mandir}/man1/* %changelog PBLOG -