15
0
forked from pool/python-ZEO

Accepting request 307274 from home:benoit_monin:branches:devel:languages:python

- update to version 4.1.0
- delete backup files found in the sources
- remove unwanted shebang of python files
- do not set the executable bit of python files
- fix update-alternatives: add %{_sysconfdir}/alternatives/...
- add new binary zeo-nagios
- update documentation files: changed upstream

OBS-URL: https://build.opensuse.org/request/show/307274
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ZEO?expand=0&rev=5
This commit is contained in:
Jan Matejek
2015-05-18 13:38:36 +00:00
committed by Git OBS Bridge
parent c001d975a9
commit 2805dab584
4 changed files with 52 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-ZEO
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2013 LISA GmbH, Bingen, Germany.
#
# All modifications and additions to the file contributed by third parties
@@ -18,7 +18,7 @@
Name: python-ZEO
Version: 4.0.0b1
Version: 4.1.0
Release: 0
Url: http://docs.pylonsproject.org
Summary: Client-Server storage implementation for ZODB
@@ -73,6 +73,10 @@ This package contains documentation files for %{name}.
%prep
%setup -q -n ZEO-%{version}
# delete backup files
find . -name "*~" -print -delete
# remove unwanted shebang
find src -name "*.py" | xargs sed -i '1 { /^#!/ d }'
%build
python setup.py build
@@ -80,12 +84,12 @@ python setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
chmod 755 %{buildroot}%{python_sitelib}/ZEO/scripts/{parsezeolog,timeout,zeoqueue,cache_simul}.py
chmod 755 %{buildroot}%{python_sitelib}/ZEO/scripts/{zeoserverlog,zeoreplay,zeopack,zeoup}.py
chmod 755 %{buildroot}%{python_sitelib}/ZEO/zeoctl.py
for fn in runzeo zeoctl zeopack zeopasswd; do
# for update-alternatives
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
for fn in runzeo zeoctl zeopack zeopasswd zeo-nagios; do
mv %{buildroot}%{_bindir}/$fn %{buildroot}%{_bindir}/$fn-%{py_ver}
ln -s %{_bindir}/$fn-%{py_ver} %{buildroot}%{_bindir}/$fn
touch %{buildroot}%{_sysconfdir}/alternatives/$fn
ln -s %{_sysconfdir}/alternatives/$fn %{buildroot}%{_bindir}/$fn
done
%check
@@ -98,6 +102,7 @@ python setup.py test
[ -h %{_bindir}/zeoctl ] || rm -f %{_bindir}/zeoctl
[ -h %{_bindir}/zeopack ] || rm -f %{_bindir}/zeopack
[ -h %{_bindir}/zeopasswd ] || rm -f %{_bindir}/zeopasswd
# not for zeo-nagios, it appeared after update-alternatives
%post
update-alternatives \
@@ -105,6 +110,7 @@ update-alternatives \
--slave %{_bindir}/zeoctl zeoctl %{_bindir}/zeoctl-%{py_ver} \
--slave %{_bindir}/zeopack zeopack %{_bindir}/zeopack-%{py_ver} \
--slave %{_bindir}/zeopasswd zeopasswd %{_bindir}/zeopasswd-%{py_ver} \
--slave %{_bindir}/zeo-nagios zeo-nagios %{_bindir}/zeo-nagios-%{py_ver}
%preun
if [ $1 -eq 0 ] ; then
@@ -113,15 +119,22 @@ fi
%files
%defattr(-,root,root,-)
%doc CHANGES.txt COPYING COPYRIGHT.txt LICENSE.txt README.txt
%ghost %attr(0755,root,root) %{_bindir}/runzeo
%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
%ghost %{_sysconfdir}/alternatives/runzeo
%{_bindir}/runzeo
%{_bindir}/runzeo-%{py_ver}
%ghost %attr(0755,root,root) %{_bindir}/zeoctl
%ghost %{_sysconfdir}/alternatives/zeoctl
%{_bindir}/zeoctl
%{_bindir}/zeoctl-%{py_ver}
%ghost %attr(0755,root,root) %{_bindir}/zeopack
%ghost %{_sysconfdir}/alternatives/zeopack
%{_bindir}/zeopack
%{_bindir}/zeopack-%{py_ver}
%ghost %attr(0755,root,root) %{_bindir}/zeopasswd
%ghost %{_sysconfdir}/alternatives/zeopasswd
%{_bindir}/zeopasswd
%{_bindir}/zeopasswd-%{py_ver}
%ghost %{_sysconfdir}/alternatives/zeo-nagios
%{_bindir}/zeo-nagios
%{_bindir}/zeo-nagios-%{py_ver}
%{python_sitelib}/ZEO
%{python_sitelib}/ZEO-%{version}-py%{py_ver}.egg-info