[python-lazy/f19] Added a macro to handle the %_pkgdocdir change between F19 and F20
David Shea
dshea at fedoraproject.org
Mon Mar 31 14:41:14 UTC 2014
commit 65cb735a9c1a99a87aea8d62f6370a8f8586ff18
Author: David Shea <dshea at redhat.com>
Date: Mon Mar 31 10:15:32 2014 -0400
Added a macro to handle the %_pkgdocdir change between F19 and F20
python-lazy.spec | 32 +++++++++++++++++++++-----------
1 files changed, 21 insertions(+), 11 deletions(-)
---
diff --git a/python-lazy.spec b/python-lazy.spec
index 33abd0e..47cdbab 100644
--- a/python-lazy.spec
+++ b/python-lazy.spec
@@ -1,6 +1,13 @@
+# F20 switches to unversioned doc dirs
+%if 0%{?fedora} > 19
+%global _python3_pkgdocdir %{_docdir}/python3-lazy
+%else
+%global _python3_pkgdocdir %{_docdir}/python3-lazy-%{version}
+%endif
+
Name: python-lazy
Version: 1.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Lazy attributes for Python objects
License: BSD
@@ -58,15 +65,15 @@ make -C docs html SPHINXBUILD=sphinx-build %{?_smp_mflags}
%{__python2} setup.py install --skip-build --root %{buildroot}
( cd %{py3dir} && %{__python3} setup.py install --skip-build --root %{buildroot} )
-mkdir -p %{buildroot}%{_docdir}/python-lazy
-mkdir -p %{buildroot}%{_docdir}/python3-lazy
+mkdir -p %{buildroot}%{_pkgdocdir}
+mkdir -p %{buildroot}%{_python3_pkgdocdir}
-cp -r docs/_build/html %{buildroot}%{_docdir}/python-lazy
-rm -f %{buildroot}%{_docdir}/python-lazy/html/.buildinfo
-rm -f %{buildroot}%{_docdir}/python-lazy/html/objects.inv
-cp -r %{py3dir}/docs/_build/html %{buildroot}%{_docdir}/python3-lazy
-rm -f %{buildroot}%{_docdir}/python3-lazy/html/.buildinfo
-rm -f %{buildroot}%{_docdir}/python3-lazy/html/objects.inv
+cp -r docs/_build/html %{buildroot}%{_pkgdocdir}
+rm -f %{buildroot}%{_pkgdocdir}/html/.buildinfo
+rm -f %{buildroot}%{_pkgdocdir}/html/objects.inv
+cp -r %{py3dir}/docs/_build/html %{buildroot}%{_python3_pkgdocdir}
+rm -f %{buildroot}%{_python3_pkgdocdir}/html/.buildinfo
+rm -f %{buildroot}%{_python3_pkgdocdir}/html/objects.inv
%check
%{__python2} setup.py check
@@ -78,11 +85,14 @@ rm -f %{buildroot}%{_docdir}/python3-lazy/html/objects.inv
%{python2_sitelib}/lazy-%{version}-*.egg-info
%files -n python3-lazy
-%dir %{_docdir}/python3-lazy
-%doc %{_docdir}/python3-lazy/html
+%dir %{_python3_pkgdocdir}
+%doc %{_python3_pkgdocdir}/html
%{python3_sitelib}/lazy
%{python3_sitelib}/lazy-%{version}-*.egg-info
%changelog
+* Mon Mar 31 2014 David Shea <dshea at redhat.com> - 1.1-2
+- Added a macro to handle the %_pkgdocdir change between F19 and F20
+
* Thu Mar 20 2014 David Shea <dshea at redhat.com> - 1.1-1
- Initial package
More information about the scm-commits
mailing list