From 1bdb246d5695b0d1ab2e25f7e07c0593773e9bda Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Jul 27 2016 16:37:57 +0000 Subject: restore documentation on EPEL6 Signed-off-by: Igor Gnatenko --- diff --git a/python-behave.spec b/python-behave.spec index 34edfaf..f754583 100644 --- a/python-behave.spec +++ b/python-behave.spec @@ -1,11 +1,11 @@ %if 0%{?rhel} && 0%{?rhel} <= 6 -%bcond_with documentation %bcond_with testsuite %else -%bcond_without documentation %bcond_without testsuite %endif +%bcond_without docs + %if 0%{?rhel} && 0%{?rhel} < 8 %bcond_with python3 %else @@ -85,7 +85,7 @@ Requires: python%{python3_pkgversion}-six Python 3 version. %endif -%if %{with documentation} +%if %{with docs} %package doc Summary: Documentation for %{name} BuildRequires: help2man @@ -105,25 +105,19 @@ brief feature-examples. %prep %autosetup -n %{modname}-%{version} -p1 -%if %{with documentation} +%if %{with docs} # Copy reST-files into a seperate dir mkdir -p reST cp -a docs/*.rst reST %endif %build -%if %{with documentation} -echo "WITH documentation" -%else -echo "WITHOUT documentation" -%endif - %py2_build %if %{with python3} %py3_build %endif -%if %{with documentation} +%if %{with docs} %if 0%{?rhel} && 0%{?rhel} <= 6 sed -i -e 's!sphinx-build!sphinx-1.0-build!g' docs/Makefile %endif @@ -140,12 +134,11 @@ mkdir -p %{buildroot}%{_mandir}/man1 %py2_install mv %{buildroot}%{_bindir}/%{modname}{,-%{python2_version}} ln -s %{modname}-%{python2_version} %{buildroot}%{_bindir}/%{modname}-2 -%if %{with documentation} +%if %{with docs} PYTHONPATH=%{buildroot}%{python2_sitelib} help2man \ --no-info \ --name="Run a number of feature tests with behave." \ --output=%{modname}-%{python2_version}.1 \ - --no-discard-stderr \ %{buildroot}%{_bindir}/%{modname}-%{python2_version} install -Dpm0644 %{modname}-%{python2_version}.1 %{buildroot}%{_mandir}/man1/ ln -s %{modname}-%{python2_version}.1 %{buildroot}%{_mandir}/man1/%{modname}.1 @@ -159,7 +152,6 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} help2man \ --no-info \ --name="Run a number of feature tests with behave." \ --output=%{modname}-%{python3_version}.1 \ - --no-discard-stderr \ %{buildroot}%{_bindir}/%{modname}-%{python3_version} install -Dpm0644 %{modname}-%{python3_version}.1 %{buildroot}%{_mandir}/man1/ %endif @@ -182,7 +174,7 @@ nosetests-%{python3_version} -v %{python2_sitelib}/%{modname}-*.egg-info/ %{python2_sitelib}/%{modname}/ %{python2_sitelib}/setuptools_%{modname}.py* -%if %{with documentation} +%if %{with docs} %doc %{_mandir}/man1/%{modname}-%{python2_version}.1* %doc %{_mandir}/man1/%{modname}.1* %endif @@ -193,7 +185,7 @@ nosetests-%{python3_version} -v %files -n python%{python3_pkgversion}-%{modname} %license LICENSE %doc README.rst -%if %{with documentation} +%if %{with docs} %doc %{_mandir}/man1/%{modname}-%{python3_version}.1* %endif %{_bindir}/%{modname}-3 @@ -204,7 +196,7 @@ nosetests-%{python3_version} -v %{python3_sitelib}/__pycache__/setuptools_%{modname}.* %endif -%if %{with documentation} +%if %{with docs} %files doc %license LICENSE %doc README.rst build/docs/html reST