SHA256
1
0
forked from pool/python-Babel

Accepting request 309070 from home:TheBlackCat:branches:devel:languages:python

Fix update-alternatives usage

OBS-URL: https://build.opensuse.org/request/show/309070
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Babel?expand=0&rev=18
This commit is contained in:
Todd R 2015-05-28 13:13:36 +00:00 committed by Git OBS Bridge
parent fbae82727b
commit 24c7926344
2 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu May 28 12:21:10 UTC 2015 - toddrme2178@gmail.com
- Fix update-alternatives usage
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Nov 08 17:11:00 UTC 2014 - Led <ledest@gmail.com> Sat Nov 08 17:11:00 UTC 2014 - Led <ledest@gmail.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package python-Babel # spec file for package python-Babel
# #
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -63,7 +63,11 @@ python setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install %install
python setup.py install --prefix=%{_prefix} --root=%{buildroot} python setup.py install --prefix=%{_prefix} --root=%{buildroot}
ln -s %{_bindir}/pybabel-%{py_ver} %{buildroot}%{_bindir}/pybabel
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
touch %{buildroot}%{_sysconfdir}/alternatives/pybabel
ln -sf %{_sysconfdir}/alternatives/pybabel %{buildroot}%{_bindir}/pybabel
%fdupes %{buildroot}%{python_sitelib} %fdupes %{buildroot}%{python_sitelib}
%check %check
@ -77,7 +81,7 @@ LC_ALL=C py.test tests
%post %post
update-alternatives --install %{_bindir}/pybabel pybabel %{_bindir}/pybabel-%{py_ver} 20 update-alternatives --install %{_bindir}/pybabel pybabel %{_bindir}/pybabel-%{py_ver} 20
%preun %postun
if [ $1 -eq 0 ] ; then if [ $1 -eq 0 ] ; then
update-alternatives --remove pybabel %{_bindir}/pybabel-%{py_ver} update-alternatives --remove pybabel %{_bindir}/pybabel-%{py_ver}
fi fi
@ -85,7 +89,8 @@ fi
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc LICENSE CHANGES README build/sphinx/html %doc LICENSE CHANGES README build/sphinx/html
%ghost %{_bindir}/pybabel %ghost %{_sysconfdir}/alternatives/pybabel
%{_bindir}/pybabel
%{_bindir}/pybabel-%{py_ver} %{_bindir}/pybabel-%{py_ver}
%{python_sitelib}/* %{python_sitelib}/*