From a63bc724790080b6960ca2e6c49dfbdec9177f40 Mon Sep 17 00:00:00 2001 From: mgb01105731 Date: Wed, 20 Jul 2022 10:30:02 +0800 Subject: [PATCH] Add doc sub package --- python-jsonpatch.spec | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/python-jsonpatch.spec b/python-jsonpatch.spec index 1f00834..73339b5 100644 --- a/python-jsonpatch.spec +++ b/python-jsonpatch.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 %global pypi_name jsonpatch %if 0%{?fedora} || 0%{?rhel} > 7 @@ -16,7 +17,7 @@ Name: python-%{pypi_name} Version: 1.21 -Release: 2%{?dist} +Release: 2%{anolis_release}%{?dist} Summary: Applying JSON Patches in Python License: BSD @@ -32,6 +33,15 @@ BuildArch: noarch Library to apply JSON Patches according to RFC 6902 - Python 2 build. %if %{with python2} + +%package -n python2-%{pypi_name}-doc +Summary: Documents for python2-%{pypi_name} +BuildArch: noarch +Requires: python2-%{pypi_name} = %{?epoch:%{epoch}:}%{version}-%{release} + +%description -n python2-%{pypi_name}-doc +Doc pages for python2-%{pypi_name} + %package -n python2-%{pypi_name} Summary: Applying JSON Patches in Python 2 @@ -47,6 +57,15 @@ Library to apply JSON Patches according to RFC 6902 - Python 2 build. %endif # with python2 %if %{with python3} + +%package -n python3-%{pypi_name}-doc +Summary: Documents for python3-%{pypi_name} +BuildArch: noarch +Requires: python3-%{pypi_name} = %{?epoch:%{epoch}:}%{version}-%{release} + +%description -n python3-%{pypi_name}-doc +Doc pages for python3-%{pypi_name} + %package -n python3-%{pypi_name} Summary: Applying JSON Patches in Python 3 @@ -107,7 +126,6 @@ done; %if %{with python2} %files -n python2-%{pypi_name} -%doc README.md %license COPYING %if !0%{?with_python3} %{_bindir}/jsondiff @@ -117,11 +135,14 @@ done; %{_bindir}/jsonpatch-2* %{python2_sitelib}/%{pypi_name}.py* %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info + +%files -n python2-%{pypi_name}-doc +%doc README.md + %endif # with python2 %if %{with python3} %files -n python3-%{pypi_name} -%doc README.md %license COPYING %{_bindir}/jsondiff %{_bindir}/jsonpatch @@ -130,9 +151,16 @@ done; %{python3_sitelib}/%{pypi_name}.py* %{python3_sitelib}/__pycache__/* %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info + +%files -n python3-%{pypi_name}-doc +%doc README.md + %endif # with python3 %changelog +* Wed Jul 20 2022 mgb01105731 - 1.21-2.0.1 +- Add doc sub package + * Thu Mar 15 2018 Charalampos Stratakis - 1.21-2 - Don't build Python 2 subpackage on EL > 7 -- Gitee