From 25ffe31d220a0f2e428bb004f2f122f4754ac073 Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Tue, 31 Oct 2023 23:40:14 -0400 Subject: [PATCH] Add doc pkg --- cowsql.spec | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/cowsql.spec b/cowsql.spec index 9b9decb..1542197 100644 --- a/cowsql.spec +++ b/cowsql.spec @@ -1,7 +1,7 @@ # adapted with love from sqlite %bcond_without check -%bcond_with docs +%bcond_without doc %bcond_without static %global gittagversion 1.15.3 @@ -32,12 +32,12 @@ BuildRequires: raft-devel BuildRequires: sqlite-devel # docs -%if %{with docs} +%if %{with doc} BuildRequires: python-sphinx -BuildRequires: python-mock -BuildRequires: python-alabaster -BuildRequires: python-commonmark -BuildRequires: python-sphinx-rtd-theme +#BuildRequires: python-mock +#BuildRequires: python-alabaster +#BuildRequires: python-commonmark +#BuildRequires: python-sphinx-rtd-theme BuildRequires: python-recommonmark %endif @@ -64,7 +64,7 @@ This package contains the header files and development documentation for %{name}. If you like to develop programs using %{name}, you will need to install %{name}-devel. -%if %{with docs} +%if %{with doc} %package doc Summary: Documentation for libcowsql BuildArch: noarch @@ -82,8 +82,9 @@ autoreconf -iv %configure %make_build -%if %{with docs} -sphinx-build -a docs docs-build +%if %{with doc} +sphinx-build -b html docs html +rm -rf html/.{doctrees,buildinfo} %endif %install @@ -93,14 +94,6 @@ sphinx-build -a docs docs-build rm -f $RPM_BUILD_ROOT/%{_libdir}/*.{la,a} %endif -%if %{with docs} -pushd docs-build -for d in **/*; do - install -Dpm 644 -t %{buildroot}/usr/share/doc/cowsql/ $d -done -popd -%endif - %if %{with check} %check make check @@ -122,9 +115,9 @@ make check %exclude %{_libdir}/*.la %endif -%if %{with docs} +%if %{with doc} %files doc -%doc /usr/share/doc/cowsql +%doc html %endif %changelog