Accepting request 419455 from home:TheBlackCat:branches:devel:languages:python
Fix update-alternatives implementation OBS-URL: https://build.opensuse.org/request/show/419455 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jsonpointer?expand=0&rev=15
This commit is contained in:
parent
e20db782e3
commit
8f667aa9e5
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 15 14:51:56 UTC 2016 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Fix update-alternatives implementation.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jun 22 14:49:05 UTC 2015 - tbechtold@suse.com
|
Mon Jun 22 14:49:05 UTC 2015 - tbechtold@suse.com
|
||||||
|
|
||||||
|
@ -19,16 +19,15 @@
|
|||||||
Name: python-jsonpointer
|
Name: python-jsonpointer
|
||||||
Version: 1.9
|
Version: 1.9
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Identify specific nodes in a JSON document (according to draft 08)
|
Summary: Identify specific nodes in a JSON document
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Url: https://github.com/stefankoegl/python-json-pointer
|
Url: https://github.com/stefankoegl/python-json-pointer
|
||||||
Source: http://pypi.python.org/packages/source/j/jsonpointer/jsonpointer-%{version}.tar.gz
|
Source: http://pypi.python.org/packages/source/j/jsonpointer/jsonpointer-%{version}.tar.gz
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(preun): update-alternatives
|
||||||
Requires(pre): coreutils
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
%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()")}
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||||
@ -47,25 +46,26 @@ python setup.py build
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||||
mv %{buildroot}%{_bindir}/jsonpointer %{buildroot}%{_bindir}/jsonpointer-%{py_ver}
|
|
||||||
ln -s %{_bindir}/jsonpointer-%{py_ver} %{buildroot}%{_bindir}/jsonpointer
|
|
||||||
|
|
||||||
%pre
|
# Prepare for update-alternatives usage
|
||||||
[ -h %{_bindir}/jsonpointer ] || rm -f %{_bindir}/jsonpointer
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
|
mv %{buildroot}%{_bindir}/jsonpointer %{buildroot}%{_bindir}/jsonpointer-%{py_ver}
|
||||||
|
ln -s -f %{_sysconfdir}/alternatives/jsonpointer %{buildroot}%{_bindir}/jsonpointer
|
||||||
|
|
||||||
%post
|
%post
|
||||||
update-alternatives --install \
|
%_sbindir/update-alternatives \
|
||||||
%{_bindir}/jsonpointer jsonpointer %{_bindir}/jsonpointer-%{py_ver} 20
|
--install %{_bindir}/jsonpointer jsonpointer %{_bindir}/jsonpointer-%{py_ver} 20
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ $1 -eq 0 ] ; then
|
if [ $1 -eq 0 ] ; then
|
||||||
update-alternatives --remove jsonpointer %{_bindir}/jsonpointer-%{py_ver}
|
%_sbindir/update-alternatives --remove jsonpointer %{_bindir}/jsonpointer-%{py_ver}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%ghost %{_bindir}/jsonpointer
|
%{_bindir}/jsonpointer
|
||||||
%{_bindir}/jsonpointer-%{py_ver}
|
%{_bindir}/jsonpointer-%{py_ver}
|
||||||
|
%ghost %{_sysconfdir}/alternatives/jsonpointer
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user