From 734fb2361358897a6e3840701cd9d47601ef19b399f90023be028e8b6806147a Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Tue, 30 Apr 2013 14:38:55 +0000 Subject: [PATCH 1/2] - Apply update-alternatives for binaries and man-pages - Apply update-alternatives for binaries and man-pages OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Sphinx?expand=0&rev=24 --- python-Sphinx.changes | 5 ++++ python-Sphinx.spec | 58 +++++++++++++++++++++++++++++++++++------- python3-Sphinx.changes | 5 ++++ python3-Sphinx.spec | 56 ++++++++++++++++++++++++++++++++-------- 4 files changed, 105 insertions(+), 19 deletions(-) diff --git a/python-Sphinx.changes b/python-Sphinx.changes index 3e93740..3673218 100644 --- a/python-Sphinx.changes +++ b/python-Sphinx.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 30 14:38:24 UTC 2013 - speilicke@suse.com + +- Apply update-alternatives for binaries and man-pages + ------------------------------------------------------------------- Tue Nov 20 11:42:44 UTC 2012 - saschpe@suse.de diff --git a/python-Sphinx.spec b/python-Sphinx.spec index 06e572b..1f82ac2 100644 --- a/python-Sphinx.spec +++ b/python-Sphinx.spec @@ -1,7 +1,7 @@ # # spec file for package python-Sphinx # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,14 +25,16 @@ License: BSD-2-Clause Group: Development/Languages/Python Source: http://pypi.python.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: fdupes -BuildRequires: python-Jinja2 BuildRequires: python-devel BuildRequires: python-distribute +# Documentation requirements: +BuildRequires: python-Jinja2 BuildRequires: python-docutils -# Testsuite build requirements: +# Testsuite requirements: BuildRequires: python-Pygments BuildRequires: python-nose +Requires(post): update-alternatives +Requires(postun): update-alternatives Requires: python-Jinja2 Requires: python-Pygments Requires: python-distribute @@ -86,19 +88,57 @@ python setup.py build_sphinx -b man %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} +for B in apidoc autogen build quickstart ; do + mv %{buildroot}%{_bindir}/sphinx-$B %{buildroot}%{_bindir}/sphinx-$B-%{py_ver} + touch %{buildroot}%{_bindir}/sphinx-$B +done install -d %{buildroot}%{_mandir}/man1/ -install -m 644 build/sphinx/man/sphinx-*.1 %{buildroot}%{_mandir}/man1/ +for M in all apidoc build quickstart ; do + install -m 644 build/sphinx/man/sphinx-$M.1 %{buildroot}%{_mandir}/man1/sphinx-$M-%{py_ver}.1 + touch %{buildroot}%{_mandir}/man1/sphinx-$M.1 +done %find_lang sphinx %check nosetests +%post +update-alternatives \ + --install %{_bindir}/sphinx-apidoc sphinx-apidoc %{_bindir}/sphinx-apidoc-%{py_ver} 10 \ + --slave %{_bindir}/sphinx-build sphinx-build %{_bindir}/sphinx-build-%{py_ver} \ + --slave %{_bindir}/sphinx-autogen sphinx-autogen %{_bindir}/sphinx-autogen-%{py_ver} \ + --slave %{_bindir}/sphinx-quickstart sphinx-quickstart %{_bindir}/sphinx-quickstart-%{py_ver} \ + --slave %{_mandir}/man1/sphinx-all.1.gz sphinx-all.1 %{_mandir}/sphinx-all-%{py_ver}.1.gz \ + --slave %{_mandir}/man1/sphinx-apidoc.1.gz sphinx-apidoc.1 %{_mandir}/sphinx-apidoc-%{py_ver}.1.gz \ + --slave %{_mandir}/man1/sphinx-build.1.gz sphinx-build.1 %{_mandir}/sphinx-build-%{py_ver}.1.gz \ + --slave %{_mandir}/man1/sphinx-quickstart.1.gz sphinx-quickstart.1 %{_mandir}/sphinx-quickstart-%{py_ver}.1.gz \ + +%postun +if [ $1 -eq 0 ] ; then + update-alternatives --remove sphinx-build %{_bindir}/sphinx-apidoc-%{py_ver} +fi + %files -f sphinx.lang %defattr(-,root,root,-) -%doc AUTHORS CHANGES LICENSE README TODO -%{_bindir}/sphinx-* -%{_mandir}/man1/sphinx-* -%{python_sitelib}/* +%doc AUTHORS CHANGES LICENSE README +%ghost %attr(0755,root,root) %{_bindir}/sphinx-apidoc +%{_bindir}/sphinx-apidoc-%{py_ver} +%ghost %attr(0755,root,root) %{_bindir}/sphinx-autogen +%{_bindir}/sphinx-autogen-%{py_ver} +%ghost %attr(0755,root,root) %{_bindir}/sphinx-build +%{_bindir}/sphinx-build-%{py_ver} +%ghost %attr(0755,root,root) %{_bindir}/sphinx-quickstart +%{_bindir}/sphinx-quickstart-%{py_ver} +%ghost %{_mandir}/man1/sphinx-all.1.gz +%{_mandir}/man1/sphinx-all-%{py_ver}.1.gz +%ghost %{_mandir}/man1/sphinx-apidoc.1.gz +%{_mandir}/man1/sphinx-apidoc-%{py_ver}.1.gz +%ghost %{_mandir}/man1/sphinx-build.1.gz +%{_mandir}/man1/sphinx-build-%{py_ver}.1.gz +%ghost %{_mandir}/man1/sphinx-quickstart.1.gz +%{_mandir}/man1/sphinx-quickstart-%{py_ver}.1.gz +%{python_sitelib}/sphinx +%{python_sitelib}/Sphinx-%{version}-py%{py_ver}.egg-info %files doc %defattr(-,root,root,-) diff --git a/python3-Sphinx.changes b/python3-Sphinx.changes index 7b7f24e..e10da19 100644 --- a/python3-Sphinx.changes +++ b/python3-Sphinx.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 30 14:38:39 UTC 2013 - speilicke@suse.com + +- Apply update-alternatives for binaries and man-pages + ------------------------------------------------------------------- Tue Nov 20 17:24:58 UTC 2012 - saschpe@suse.de diff --git a/python3-Sphinx.spec b/python3-Sphinx.spec index db2b9d3..0d7f645 100644 --- a/python3-Sphinx.spec +++ b/python3-Sphinx.spec @@ -1,7 +1,7 @@ # # spec file for package python3-Sphinx # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,15 +25,16 @@ License: BSD-2-Clause Group: Development/Languages/Python Source: http://pypi.python.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz Patch0: python3-Sphinx-docs.patch -BuildRequires: fdupes -BuildRequires: python3-2to3 -BuildRequires: python3-Jinja2 BuildRequires: python3-devel BuildRequires: python3-distribute +# Documentation requirements: +BuildRequires: python3-Jinja2 BuildRequires: python3-docutils -# Testsuite build requirements: +# Testsuite requirements: BuildRequires: python3-Pygments BuildRequires: python3-nose +Requires(post): update-alternatives +Requires(postun): update-alternatives Requires: python3-Jinja2 Requires: python3-Pygments Requires: python3-distribute @@ -86,21 +87,56 @@ python3 setup.py build_sphinx -b man # Build man-pages %install python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} +for B in apidoc autogen build quickstart ; do + touch %{buildroot}%{_bindir}/sphinx-$B +done install -d %{buildroot}%{_mandir}/man1/ -install -m 644 build/sphinx/man/*.1 %{buildroot}%{_mandir}/man1/ -%fdupes %{buildroot}%{_prefix} +for M in all apidoc build quickstart ; do + install -m 644 build/sphinx/man/sphinx-$M-%{py3_ver}.1 %{buildroot}%{_mandir}/man1/sphinx-$M-%{py3_ver}.1 + touch %{buildroot}%{_mandir}/man1/sphinx-$M.1 +done %find_lang sphinx #TODO: Fix #%%check #nosetests-%{py3_ver} +%post +update-alternatives \ + --install %{_bindir}/sphinx-apidoc sphinx-apidoc %{_bindir}/sphinx-apidoc-%{py3_ver} 10 \ + --slave %{_bindir}/sphinx-build sphinx-build %{_bindir}/sphinx-build-%{py3_ver} \ + --slave %{_bindir}/sphinx-autogen sphinx-autogen %{_bindir}/sphinx-autogen-%{py3_ver} \ + --slave %{_bindir}/sphinx-quickstart sphinx-quickstart %{_bindir}/sphinx-quickstart-%{py3_ver} \ + --slave %{_mandir}/man1/sphinx-all.1.gz sphinx-all.1 %{_mandir}/sphinx-all-%{py3_ver}.1.gz \ + --slave %{_mandir}/man1/sphinx-apidoc.1.gz sphinx-apidoc.1 %{_mandir}/sphinx-apidoc-%{py3_ver}.1.gz \ + --slave %{_mandir}/man1/sphinx-build.1.gz sphinx-build.1 %{_mandir}/sphinx-build-%{py3_ver}.1.gz \ + --slave %{_mandir}/man1/sphinx-quickstart.1.gz sphinx-quickstart.1 %{_mandir}/sphinx-quickstart-%{py3_ver}.1.gz \ + +%postun +if [ $1 -eq 0 ] ; then + update-alternatives --remove sphinx-build %{_bindir}/sphinx-apidoc-%{py3_ver} +fi + %files -f sphinx.lang %defattr(-,root,root,-) %doc AUTHORS CHANGES LICENSE README TODO -%{_bindir}/sphinx-*-%{py3_ver} -%{_mandir}/man1/sphinx-*-%{py3_ver}.1.gz -%{python3_sitelib}/sphinx/ +%ghost %attr(0755,root,root) %{_bindir}/sphinx-apidoc +%{_bindir}/sphinx-apidoc-%{py3_ver} +%ghost %attr(0755,root,root) %{_bindir}/sphinx-autogen +%{_bindir}/sphinx-autogen-%{py3_ver} +%ghost %attr(0755,root,root) %{_bindir}/sphinx-build +%{_bindir}/sphinx-build-%{py3_ver} +%ghost %attr(0755,root,root) %{_bindir}/sphinx-quickstart +%{_bindir}/sphinx-quickstart-%{py3_ver} +%ghost %{_mandir}/man1/sphinx-all.1.gz +%{_mandir}/man1/sphinx-all-%{py3_ver}.1.gz +%ghost %{_mandir}/man1/sphinx-apidoc.1.gz +%{_mandir}/man1/sphinx-apidoc-%{py3_ver}.1.gz +%ghost %{_mandir}/man1/sphinx-build.1.gz +%{_mandir}/man1/sphinx-build-%{py3_ver}.1.gz +%ghost %{_mandir}/man1/sphinx-quickstart.1.gz +%{_mandir}/man1/sphinx-quickstart-%{py3_ver}.1.gz +%{python3_sitelib}/sphinx %{python3_sitelib}/Sphinx-%{version}-py%{py3_ver}.egg-info %files doc From 45cf43dddc9c1e62628508cee865affad97e5c6ae6ea70feb3ec90015c271a9f Mon Sep 17 00:00:00 2001 From: Todd R Date: Wed, 8 May 2013 09:01:18 +0000 Subject: [PATCH 2/2] Accepting request 174681 from home:HighwayStar:branches:devel:languages:python - fix building under openSUSE 12.1, 12.2: BuildRequires: python3-2to3 should be explicitly stated OBS-URL: https://build.opensuse.org/request/show/174681 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Sphinx?expand=0&rev=25 --- python3-Sphinx.changes | 6 ++++++ python3-Sphinx.spec | 1 + 2 files changed, 7 insertions(+) diff --git a/python3-Sphinx.changes b/python3-Sphinx.changes index e10da19..d174cd0 100644 --- a/python3-Sphinx.changes +++ b/python3-Sphinx.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue May 7 08:16:04 UTC 2013 - highwaystar.ru@gmail.com + +- fix building under openSUSE 12.1, 12.2: + BuildRequires: python3-2to3 should be explicitly stated + ------------------------------------------------------------------- Tue Apr 30 14:38:39 UTC 2013 - speilicke@suse.com diff --git a/python3-Sphinx.spec b/python3-Sphinx.spec index 0d7f645..ebd8e0d 100644 --- a/python3-Sphinx.spec +++ b/python3-Sphinx.spec @@ -25,6 +25,7 @@ License: BSD-2-Clause Group: Development/Languages/Python Source: http://pypi.python.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz Patch0: python3-Sphinx-docs.patch +BuildRequires: python3-2to3 BuildRequires: python3-devel BuildRequires: python3-distribute # Documentation requirements: