%define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") %define python_sitelib64 %(python_64 -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") %define _libdir64 %{_prefix}/lib64 %define real_name paramiko Name: python-paramiko Version: 1.7.6 Release: 1 Summary: A SSH2 protocol library for python Group: Development/Libraries # No version specified. License: LGPLv2+ URL: http://www.lag.net/paramiko/ Source0: http://www.lag.net/paramiko/download/%{real_name}-%{version}.tar.gz # From: https://github.com/garyvdm/paramiko/commit/044e7029986a060552770feb1687b00862f1a6ba Patch0: 0001-Use-Crypto.Random-rather-than-Crypto.Util.RandomPool.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: AIX-rpm >= 5.2.0.0 BuildRequires: patch, sed BuildRequires: python-devel >= 2.6.2 BuildRequires: python-pycrypto >= 2.3-1 BuildRequires: python-setuptools # we need /dev/urandom Requires: AIX-rpm >= 5.2.0.0 Requires: python >= 2.6.2 Requires: python-pycrypto >= 2.3-1 %description Paramiko (a combination of the esperanto words for "paranoid" and "friend") is a module for python 2.3 or greater that implements the SSH2 protocol for secure (encrypted and authenticated) connections to remote machines. Unlike SSL (aka TLS), the SSH2 protocol does not require heirarchical certificates signed by a powerful central authority. You may know SSH2 as the protocol that replaced telnet and rsh for secure access to remote shells, but the protocol also includes the ability to open arbitrary channels to remote services across an encrypted tunnel. (This is how sftp works, for example.) %prep %setup -q -n %{real_name}-%{version} export PATH=/opt/freeware/bin:$PATH %patch0 -p1 -b .randpooldepr %{__chmod} a-x demos/* sed -i -e '/^#!/,1d' demos/* paramiko/rng* mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cp -r 32bit/* 64bit/ %build cd 64bit python_64 setup.py build cd ../32bit python setup.py build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit python_64 setup.py install --skip-build --root ${RPM_BUILD_ROOT} mv ${RPM_BUILD_ROOT}%{_libdir} ${RPM_BUILD_ROOT}%{_libdir64} cd ../32bit python setup.py install --skip-build --root ${RPM_BUILD_ROOT} %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc 32bit/LICENSE 32bit/PKG-INFO 32bit/README 32bit/docs/ 32bit/demos/ %{python_sitelib}/* %{python_sitelib64}/* %changelog * Tue Feb 08 2011 Michael Perzl - 1.7.6-1 - updated to version 1.7.6 * Wed Sep 02 2009 Michael Perzl - 1.7.5-1 - first version for AIX V5.1 and higher