Hello community, here is the log from the commit of package bpython for openSUSE:Factory checked in at 2013-10-11 08:53:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/bpython (Old) and /work/SRC/openSUSE:Factory/.bpython.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bpython" Changes: -------- --- /work/SRC/openSUSE:Factory/bpython/bpython.changes 2013-04-01 11:28:25.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.bpython.new/bpython.changes 2013-10-11 08:53:06.000000000 +0200 @@ -1,0 +2,5 @@ +Mon Oct 7 15:00:07 UTC 2013 - p.drou...@gmail.com + +- Apply update-alternatives for binaries and man-pages + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bpython.spec ++++++ --- /var/tmp/diff_new_pack.3415fw/_old 2013-10-11 08:53:07.000000000 +0200 +++ /var/tmp/diff_new_pack.3415fw/_new 2013-10-11 08:53:07.000000000 +0200 @@ -26,7 +26,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python-devel BuildRequires: update-desktop-files -BuildRequires: python-distribute +BuildRequires: python-setuptools # Documentation requirements: BuildRequires: python-Sphinx # Test requirements: @@ -36,6 +36,8 @@ Requires: python-curses Requires: python-pygments Requires: python-pyparsing +Requires(post): update-alternatives +Requires(postun): update-alternatives %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %else @@ -53,6 +55,14 @@ %prep %setup -q sed -i "/Icon.*/d" data/bpython.desktop # Drop non-existing icon reference +sed -i "s/bpython =/bpython-%{py_ver} =/" setup.py +sed -i "s/bpython-urwid =/bpython-urwid-%{py_ver} =/" setup.py +sed -i "s/bpython-gtk =/bpython-gtk-%{py_ver} =/" setup.py +sed -i "s/bpython.1/bpython-%{py_ver}.1/" setup.py +sed -i "s/bpython-config.5/bpython-config-%{py_ver}.5/" setup.py +sed -i "s/, 'bpython'/, 'bpython-%{py_ver}'/" doc/sphinx/source/conf.py +sed -i "s/, 'bpython-config'/, 'bpython-config-%{py_ver}'/" doc/sphinx/source/conf.py + %build python setup.py build @@ -60,6 +70,11 @@ %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} +ln -s %{_bindir}/bpython-%{py_ver} %{buildroot}%{_bindir}/bpython +ln -s %{_bindir}/bpython-urwid-%{py_ver} %{buildroot}%{_bindir}/bpython-urwid +ln -s %{_bindir}/bpython-gtk-%{py_ver} %{buildroot}%{_bindir}/bpython-gtk +ln -s %{_mandir}/man1/bpython-%{py_ver}.1 %{buildroot}%{_mandir}/man1/bpython.1 +ln -s %{_mandir}/man5/bpython-config-%{py_ver}.5 %{buildroot}%{_mandir}/man5/bpython-config.5 rm -r %{buildroot}%{python_sitelib}/bpython/test # Don't ship tests %if 0%{?suse_version} %suse_update_desktop_file -G bpython -r %{name} Development IDE @@ -69,17 +84,48 @@ #%%check #nosetests + +%pre +# Since /usr/bin/pybabel became ghosted to be used with update-alternatives, we have to get rid +# of the old binary resulting from the non-update-alternativies-ified package: +[[ ! -L %{_bindir}/bpython ]] && rm -f %{_bindir}/bpython +[[ ! -L %{_bindir}/bpython-urwid ]] && rm -f %{_bindir}/bpython-urwid +[[ ! -L %{_bindir}/bpython-gtk ]] && rm -f %{_bindir}/bpython-gtk +[[ ! -L %{_mandir}/man1/bpython.1.gz ]] && rm -f %{_mandir}/man1/bpython.1.gz +[[ ! -L %{_mandir}/man5/bpython-config.5.gz ]] && rm -f %{_mandir}/man5/bpython-config.5.gz +exit 0 + +%post +update-alternatives \ + --install %{_bindir}/bpython bpython %{_bindir}/bpython-%{py_ver} 30 \ + --slave %{_mandir}/man1/bpython.1.gz bpython.1 %{_mandir}/man1/bpython-%{py_ver}.1.gz \ + --slave %{_mandir}/man5/bpython-config.5.gz bpython-config.5 %{_mandir}/man5/bpython-config-%{py_ver}.5.gz +update-alternatives --install %{_bindir}/bpython-urwid bpython-urwid %{_bindir}/bpython-urwid-%{py_ver} 30 +update-alternatives --install %{_bindir}/bpython-gtk bpython-gtk %{_bindir}/bpython-gtk-%{py_ver} 30 + +%preun +if [ $1 -eq 0 ] ; then + update-alternatives --remove bpython %{_bindir}/bpython-%{py_ver} + update-alternatives --remove bpython-urwid %{_bindir}/bpython-urwid-%{py_ver} + update-alternatives --remove bpython-gtk %{_bindir}/bpython-gtk-%{py_ver} +fi + %files %defattr(-,root,root) %doc AUTHORS CHANGELOG LICENSE ROADMAP TODO build/sphinx/html -%{_bindir}/bpython -%{_bindir}/bpython-gtk -%{_bindir}/bpython-urwid +%ghost %{_bindir}/bpython +%{_bindir}/bpython-%{py_ver} +%ghost %{_bindir}/bpython-gtk +%{_bindir}/bpython-gtk-%{py_ver} +%ghost %{_bindir}/bpython-urwid +%{_bindir}/bpython-urwid-%{py_ver} %{python_sitelib}/bpdb %{python_sitelib}/bpython-%{version}-py%{py_ver}.egg-info %{python_sitelib}/bpython -%{_mandir}/man1/bpython.1.gz -%{_mandir}/man5/bpython-config.5.gz +%ghost %{_mandir}/man1/bpython.1.gz +%{_mandir}/man1/bpython-%{py_ver}.1.gz +%ghost %{_mandir}/man5/bpython-config.5.gz +%{_mandir}/man5/bpython-config-%{py_ver}.5.gz %{_datadir}/applications/%{name}.desktop %changelog -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org