Add doc pkg

This commit is contained in:
Neil Hanlon 2023-10-31 23:40:14 -04:00 committed by Neil Hanlon
parent 236090ebb3
commit 25ffe31d22
Signed by: neil
GPG Key ID: 705BC21EC3C70F34

View File

@ -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