diff --git a/python-Markdown.changes b/python-Markdown.changes index ad99a4b..75f55af 100644 --- a/python-Markdown.changes +++ b/python-Markdown.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jul 9 18:12:04 UTC 2014 - i@marguerite.su + +- fix conflicts with python3-Markdown + * both use update-alternatives + ------------------------------------------------------------------- Mon May 26 21:40:35 UTC 2014 - hpj@urpla.net diff --git a/python-Markdown.spec b/python-Markdown.spec index d224501..282b342 100644 --- a/python-Markdown.spec +++ b/python-Markdown.spec @@ -28,6 +28,8 @@ BuildRequires: python-devel BuildRequires: python-nose BuildRequires: python-xml Requires: python-xml +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: python-markdown = %{version} Obsoletes: python-markdown < %{version} @@ -55,15 +57,33 @@ python setup.py build %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} +# update-alternatives +mv %{buildroot}%{_bindir}/markdown_py %{buildroot}%{_bindir}/markdown_py-%{py_ver} +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +touch %{buildroot}%{_sysconfdir}/alternatives/markdown_py +ln -sf %{_sysconfdir}/alternatives/markdown_py %{buildroot}%{_bindir}/markdown_py + %if 0%{?suse_version} && 0%{?suse_version} > 1110 %check python run-tests.py %endif +%post +update-alternatives \ + --install %{_bindir}/markdown_py markdown_py %{_bindir}/markdown_py-%{py_ver} 20 + +%postun +if [ $1 -eq 0 ] ; then + update-alternatives --remove markdown_py %{_bindir}/markdown_py-%{py_ver} +fi + %files %defattr(-,root,root,-) %doc LICENSE.md README.md docs/* +%ghost %{_sysconfdir}/alternatives/markdown_py %{_bindir}/markdown_py -%{python_sitelib}/* +%{_bindir}/markdown_py-%{py_ver} +%{python_sitelib}/Markdown-%{version}-py%{py_ver}.egg-info +%{python_sitelib}/markdown %changelog