15
0

Accepting request 367842 from devel:languages:python

1

OBS-URL: https://build.opensuse.org/request/show/367842
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-parallax?expand=0&rev=4
This commit is contained in:
2016-03-18 20:39:57 +00:00
committed by Git OBS Bridge
2 changed files with 25 additions and 5 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Mar 7 08:48:52 UTC 2016 - kgronlund@suse.com
- Add alternatives entry for parallax-askpass
-------------------------------------------------------------------
Fri Jun 12 15:26:42 UTC 2015 - kgronlund@suse.com

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-parallax
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2016 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
@@ -28,11 +28,9 @@ BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: openssh
%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
Requires(post): update-alternatives
Requires(postun): update-alternatives
%description
Parallax SSH provides an interface to executing commands on multiple
@@ -48,11 +46,28 @@ python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
# create a dummy target for /etc/alternatives/parallax-askpass
mv %{buildroot}%{_bindir}/parallax-askpass %{buildroot}%{_bindir}/parallax-askpass-%{py_ver}
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
touch %{buildroot}%{_sysconfdir}/alternatives/parallax-askpass
ln -s -f %{_sysconfdir}/alternatives/parallax-askpass %{buildroot}%{_bindir}/parallax-askpass
%post
"%_sbindir/update-alternatives" --install \
/%{_bindir}/parallax-askpass parallax-askpass %{_bindir}/parallax-askpass-%{py_ver} 20
%postun
if [ "$1" = 0 ] ; then
"%_sbindir/update-alternatives" --remove parallax-askpass %{_bindir}/parallax-askpass-%{py_ver}
fi
%files
%defattr(-,root,root,-)
%doc AUTHORS README.md COPYING
%{python_sitelib}/parallax
%{python_sitelib}/parallax-%{version}*.egg-info
%{_bindir}/parallax-askpass
%{_bindir}/parallax-askpass-%{py_ver}
%ghost %_sysconfdir/alternatives/parallax-askpass
%changelog