forked from pool/python-blockdiag
Accepting request 443108 from home:termim:branches:devel:languages:python
implement update-alternatives OBS-URL: https://build.opensuse.org/request/show/443108 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=2
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 1 20:18:05 UTC 2016 - termim@gmail.com
|
||||||
|
|
||||||
|
- use update-alternatives
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu May 12 07:12:05 UTC 2016 - tbechtold@suse.com
|
Thu May 12 07:12:05 UTC 2016 - tbechtold@suse.com
|
||||||
|
|
||||||
|
@@ -23,9 +23,12 @@ Summary: Generates block-diagram image from text
|
|||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Url: http://blockdiag.com/
|
Url: http://blockdiag.com/
|
||||||
Source: https://pypi.python.org/packages/source/b/blockdiag/blockdiag-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/b/blockdiag/blockdiag-%{version}.tar.gz
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: fdupes
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun): update-alternatives
|
||||||
Requires: python-Pillow
|
Requires: python-Pillow
|
||||||
Requires: python-funcparserlib
|
Requires: python-funcparserlib
|
||||||
Requires: python-webcolors
|
Requires: python-webcolors
|
||||||
@@ -50,11 +53,23 @@ python setup.py build
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||||
|
%fdupes %{buildroot}%{python_sitelib}
|
||||||
|
mv %{buildroot}%{_bindir}/blockdiag %{buildroot}%{_bindir}/blockdiag-%{py_ver}
|
||||||
|
|
||||||
|
%post
|
||||||
|
update-alternatives \
|
||||||
|
--install %{_bindir}/blockdiag blockdiag %{_bindir}/blockdiag-%{py_ver} 50
|
||||||
|
|
||||||
|
%postun
|
||||||
|
if [ $1 -eq 0 ] ; then
|
||||||
|
update-alternatives --remove blockdiag %{_bindir}/blockdiag-%{py_ver}
|
||||||
|
fi
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc CHANGES.rst LICENSE README.rst
|
%doc CHANGES.rst LICENSE README.rst
|
||||||
%{_bindir}/blockdiag
|
%{_bindir}/blockdiag-%{py_ver}
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
%ghost %{_sysconfdir}/alternatives/blockdiag
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user