forked from pool/python-zdaemon
Accepting request 221309 from home:posophe:branches:devel:languages:python
fix update-alternatives OBS-URL: https://build.opensuse.org/request/show/221309 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zdaemon?expand=0&rev=18
This commit is contained in:
committed by
Git OBS Bridge
parent
db503fec46
commit
3bccacafc3
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 7 13:17:03 UTC 2014 - p.drouand@gmail.com
|
||||||
|
|
||||||
|
- Fix wrong implementation
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Feb 7 12:43:58 UTC 2014 - p.drouand@gmail.com
|
Fri Feb 7 12:43:58 UTC 2014 - p.drouand@gmail.com
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define modname zdaemon
|
%define modname zdaemon
|
||||||
|
|
||||||
Name: python-%{modname}
|
Name: python-%{modname}
|
||||||
@@ -29,8 +28,8 @@ Source: https://pypi.python.org/packages/source/z/zdaemon/%{modname}-%{v
|
|||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
BuildRequires: unzip
|
BuildRequires: unzip
|
||||||
Requires(post): update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(pre): update-alternatives
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -48,14 +47,10 @@ python setup.py build
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||||
ln -s %{_bindir}/%{modname}-%{py_ver} %{buildroot}%{_bindir}/%{modname}
|
# create a dummy target for /etc/alternatives/zdaemon
|
||||||
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
%pre
|
touch %{buildroot}%{_sysconfdir}/alternatives/%{modname}
|
||||||
# Since /usr/bin/zdaemon became ghosted to be used
|
ln -s -f %{_sysconfdir}/alternatives/%{modname} %{buildroot}/%{_bindir}/%{modname}
|
||||||
# with update-alternatives, we have to get rid of the old binary resulting from the
|
|
||||||
# non-update-alternativies-ified package:
|
|
||||||
[[ ! -L %{_bindir}/%{modname} ]] && rm -f %{_bindir}/%{modname}
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
update-alternatives \
|
update-alternatives \
|
||||||
@@ -69,11 +64,9 @@ fi
|
|||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc README.txt CHANGES.txt
|
%doc README.txt CHANGES.txt
|
||||||
%if 0%{?suse_version} >= 1230
|
|
||||||
%ghost %{_sysconfdir}/alternatives/%{modname}
|
%ghost %{_sysconfdir}/alternatives/%{modname}
|
||||||
%endif
|
|
||||||
%ghost %{_bindir}/%{modname}
|
|
||||||
%{python_sitelib}
|
%{python_sitelib}
|
||||||
|
%{_bindir}/%{modname}
|
||||||
%{_bindir}/%{modname}-%{py_ver}
|
%{_bindir}/%{modname}-%{py_ver}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
Reference in New Issue
Block a user