forked from pool/python-parallax
- Fix broken package build for non-SUSE distributions OBS-URL: https://build.opensuse.org/request/show/391794 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-parallax?expand=0&rev=12
74 lines
2.5 KiB
RPMSpec
74 lines
2.5 KiB
RPMSpec
#
|
|
# spec file for package python-parallax
|
|
#
|
|
# 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
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: python-parallax
|
|
Version: 1.0.1
|
|
Release: 0
|
|
Summary: Execute commands and copy files over SSH to multiple machines at once
|
|
License: BSD-3-Clause
|
|
Group: Development/Languages/Python
|
|
Url: https://github.com/krig/parallax/
|
|
Source: https://pypi.python.org/packages/source/p/parallax/parallax-%{version}.tar.gz
|
|
BuildRequires: python-devel
|
|
BuildRequires: python-setuptools
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
Requires: openssh
|
|
BuildArch: noarch
|
|
Requires(post): /usr/sbin/update-alternatives
|
|
Requires(postun): /usr/sbin/update-alternatives
|
|
|
|
%description
|
|
Parallax SSH provides an interface to executing commands on multiple
|
|
nodes at once using SSH. It also provides commands for sending and receiving files to
|
|
multiple nodes using SCP.
|
|
|
|
%prep
|
|
%setup -q -n parallax-%{version}
|
|
|
|
%build
|
|
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
|