[packages/python-openid] build docs; package as apidocs subpackage

glen glen at pld-linux.org
Fri May 6 18:03:47 CEST 2016


commit eedd06f5c91fa7c96971efdae492184972bd478e
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Fri May 6 19:02:01 2016 +0300

    build docs; package as apidocs subpackage

 python-openid.spec | 37 ++++++++++++++++++++++++++++++++-----
 1 file changed, 32 insertions(+), 5 deletions(-)
---
diff --git a/python-openid.spec b/python-openid.spec
index 8d2a932..a6d9428 100644
--- a/python-openid.spec
+++ b/python-openid.spec
@@ -1,6 +1,11 @@
+#
+# Conditional build:
+%bcond_without	doc	# don't build doc
+
+%define 	module	openid
 Summary:	OpenID consumer and server library for Python
 Summary(pl.UTF-8):	Biblioteka konsumenta i serwera OpenID dla Pythona
-Name:		python-openid
+Name:		python-%{module}
 Version:	2.2.5
 Release:	1
 License:	Apache
@@ -11,6 +16,9 @@ URL:		https://github.com/openid/python-openid
 BuildRequires:	python >= 1:2.5
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires:	epydoc
+%endif
 Requires:	python-urljr >= 1.0.0
 Requires:	python-yadis >= 1.1.0
 BuildArch:	noarch
@@ -22,15 +30,28 @@ OpenID consumer and server library for Python.
 %description -l pl.UTF-8
 Biblioteka konsumenta i serwera OpenID dla Pythona.
 
+%package apidocs
+Summary:	%{module} API documentation
+Summary(pl.UTF-8):	Dokumentacja API %{module}
+Group:		Documentation
+
+%description apidocs
+API documentation for %{module}.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API %{module}.
+
 %prep
 %setup -q
 
 %build
 %py_build
+%if %{with doc}
+sh admin/makedoc
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 %py_install
 
 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
@@ -42,6 +63,12 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc README doc/*
-%{py_sitescriptdir}/openid
-%{py_sitescriptdir}/python_openid-*.egg-info
+%doc README
+%{py_sitescriptdir}/%{module}
+%{py_sitescriptdir}/python_openid-%{version}-py*.egg-info
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc doc/*
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-openid.git/commitdiff/eedd06f5c91fa7c96971efdae492184972bd478e



More information about the pld-cvs-commit mailing list