forked from pool/python-ZConfig
Accepting request 230404 from home:posophe:branches:devel:languages:python
Update + update-alternatives OBS-URL: https://build.opensuse.org/request/show/230404 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ZConfig?expand=0&rev=5
This commit is contained in:
committed by
Git OBS Bridge
parent
502aee7516
commit
981e9aae1b
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: python-ZConfig
|
||||
Version: 3.0.3
|
||||
Version: 3.0.4
|
||||
Release: 0
|
||||
Summary: Structured Configuration Library
|
||||
License: ZPL-2.1
|
||||
@@ -70,16 +70,38 @@ python setup.py build
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
# Rename binaries to get package installable with py/py3 package
|
||||
mv %{buildroot}%{_bindir}/zconfig %{buildroot}%{_bindir}/zconfig-%{py_ver}
|
||||
mv %{buildroot}%{_bindir}/zconfig_schema2html %{buildroot}%{_bindir}/zconfig_schema2html-%{py_ver}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
touch %{buildroot}%{_sysconfdir}/alternatives/zconfig
|
||||
ln -sf %{_sysconfdir}/alternatives/zconfig %{buildroot}/%{_bindir}/zconfig
|
||||
touch %{buildroot}%{_sysconfdir}/alternatives/zconfig_schema2html
|
||||
ln -sf %{_sysconfdir}/alternatives/zconfig_schema2html %{buildroot}/%{_bindir}/zconfig_schema2html
|
||||
|
||||
%check
|
||||
python setup.py test -v
|
||||
|
||||
%post
|
||||
update-alternatives \
|
||||
--install %{_bindir}/zconfig zconfig %{_bindir}/zconfig-%{py_ver} 30 \
|
||||
--slave %{_bindir}/zconfig_schema2html zconfig_schema2html %{_bindir}/zconfig_schema2html-%{py_ver}
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
update-alternatives --remove zconfig %{_bindir}/zconfig-%{py_ver}
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc CHANGES.txt COPYRIGHT.txt LICENSE.txt PKG-INFO README.txt
|
||||
%{python_sitelib}/*
|
||||
%ghost %{_sysconfdir}/alternatives/zconfig
|
||||
%ghost %{_sysconfdir}/alternatives/zconfig_schema2html
|
||||
%{_bindir}/zconfig
|
||||
%{_bindir}/zconfig-%{py_ver}
|
||||
%{_bindir}/zconfig_schema2html
|
||||
%{_bindir}/zconfig_schema2html-%{py_ver}
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root,-)
|
||||
|
||||
Reference in New Issue
Block a user