-# TODO: package /usr/docs/*
+%bcond_without doc
%define module jinja2
Summary: Template engine
Summary(pl.UTF-8): Silnik szablonów
Name: python-%{module}
-Version: 2.2.1
+Version: 2.3.1
Release: 1
License: BSD
Group: Development/Languages/Python
Source0: http://pypi.python.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
-# Source0-md5: fea849d68891218eb0b21c170f1c32d5
+# Source0-md5: 391c7dd06c62dfe7e30ebaad7af0a401
URL: http://pypi.python.org/pypi/Jinja2
BuildRequires: python-devel
+%if %{with doc}
+BuildRequires: sphinx-pdg
+%endif
+%bcond_without doc
%pyrequires_eq python-modules
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%build
%{__python} setup.py build
+%if %{with doc}
+cd docs
+make html
+rm -rf _build/html/_sources
+%endif
%install
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc PKG-INFO TODO AUTHORS
+%doc PKG-INFO AUTHORS CHANGES
+%if %{with doc}
+%doc docs/_build/html
+%endif
%{py_sitescriptdir}/%{module}
%{py_sitescriptdir}/*Jinja*.egg*