forked from pool/python-zdaemon
Accepting request 307359 from home:benoit_monin:branches:devel:languages:python
- update to version 4.1.0 - update project URL - update source URL, tar.gz not available - add new build dependency unzip - declare BuildRoot - declare python_sitelib for SLE11 - fix update-alternatives (post, postun) - remove unwanted shebang of nokill.py - update package documentation and add LICENSE.txt OBS-URL: https://build.opensuse.org/request/show/307359 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zdaemon?expand=0&rev=21
This commit is contained in:
committed by
Git OBS Bridge
parent
094fcb61c1
commit
f82e5808e5
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-zdaemon
|
||||
#
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -19,19 +19,25 @@
|
||||
%define modname zdaemon
|
||||
|
||||
Name: python-%{modname}
|
||||
Version: 4.0.0
|
||||
Version: 4.1.0
|
||||
Release: 0
|
||||
Summary: Daemon process control library and tools
|
||||
License: ZPL-2.1
|
||||
Group: Development/Languages/Python
|
||||
Url: http://pypi.python.org/pypi/zdaemon
|
||||
Source: https://pypi.python.org/packages/source/z/zdaemon/%{modname}-%{version}.tar.gz
|
||||
Url: https://github.com/zopefoundation/zdaemon
|
||||
Source: https://pypi.python.org/packages/source/z/zdaemon/%{modname}-%{version}.zip
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: update-alternatives
|
||||
Requires(pre): update-alternatives
|
||||
BuildRequires: unzip
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
Requires: python-ZConfig
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%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()")}
|
||||
%else
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%description
|
||||
zdaemon is a Python package which provides APIs for managing
|
||||
@@ -42,6 +48,8 @@ although it is not limited to running Python-based applications
|
||||
%prep
|
||||
%setup -q -n %{modname}-%{version}
|
||||
sed -i "s|%{modname} =|%{modname}-%{py_ver} =|" setup.py
|
||||
# remove unwanted shebang
|
||||
sed -i '1 { /^#!/ d }' src/zdaemon/tests/nokill.py
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
@@ -57,16 +65,16 @@ ln -s -f %{_sysconfdir}/alternatives/%{modname} %{buildroot}/%{_bindir}/%{modnam
|
||||
update-alternatives \
|
||||
--install %{_bindir}/%{modname} %{modname} %{_bindir}/%{modname}-%{py_ver} 20
|
||||
|
||||
%preun
|
||||
%postun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
update-alternatives --remove %{modname} %{_bindir}/%{modname}-%{py_ver}
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc README.txt CHANGES.txt
|
||||
%doc README.rst CHANGES.rst LICENSE.txt
|
||||
%ghost %{_sysconfdir}/alternatives/%{modname}
|
||||
%{python_sitelib}
|
||||
%{python_sitelib}/*
|
||||
%{_bindir}/%{modname}
|
||||
%{_bindir}/%{modname}-%{py_ver}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user