When PDF docs are disabled, omit the -doc subpackage

This commit is contained in:
Benjamin A. Beasley 2023-07-12 12:13:17 -04:00
parent 346082adca
commit 84ad325549
1 changed files with 7 additions and 5 deletions

View File

@ -33,7 +33,6 @@ BuildRequires: python3-devel
# development.txt: pytest==6.2.4 # development.txt: pytest==6.2.4
BuildRequires: python3dist(pytest) BuildRequires: python3dist(pytest)
# Documentation dependencies
%if %{with doc_pdf} %if %{with doc_pdf}
BuildRequires: make BuildRequires: make
# development.txt: Sphinx==2.3.1 # development.txt: Sphinx==2.3.1
@ -58,10 +57,12 @@ Summary: %{summary}
%description -n python3-sure %{common_description} %description -n python3-sure %{common_description}
%if %{with doc_pdf}
%package doc %package doc
Summary: Documentation for Sure Summary: Documentation for Sure
%description doc %{common_description} %description doc %{common_description}
%endif
%prep %prep
@ -104,16 +105,17 @@ install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 '%{SOURCE1}'
%files -n python3-sure -f %{pyproject_files} %files -n python3-sure -f %{pyproject_files}
%if %{without doc_pdf}
%doc CHANGELOG.md README.rst TODO.rst
%endif
%{_bindir}/sure %{_bindir}/sure
%{_mandir}/man1/sure.1* %{_mandir}/man1/sure.1*
%if %{with doc_pdf}
%files doc %files doc
%license COPYING %license COPYING
%doc CHANGELOG.md %doc CHANGELOG.md README.rst TODO.rst
%doc README.rst
%doc TODO.rst
%if %{with doc_pdf}
%doc docs/build/latex/Sure.pdf %doc docs/build/latex/Sure.pdf
%endif %endif