File python-crypto.spec of Package python-crypto.564

# spec file for package python-crypto (Version 2.3)
# Copyright (c) 2010 SUSE LINUX Products 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

# norootforbuild

Name:           python-crypto
BuildRequires:  python-devel
BuildRequires:  gmp-devel
License:        Python License
Group:          Development/Libraries/Python
Version:        2.3
Release:        1
Summary:        Cryptographic Algorithms and Protocols for Python
Source:         pycrypto-%{version}.tar.bz2
Patch0:         pycrypto-2.1.0-ssize.patch
Patch1:         python-crypto-remove_bogus_shebang.patch
Patch2:         pycrypto-2.6-elgamal.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

The package contains: * Hash functions: MD2, MD4, RIPEMD, SHA256.

* Block encryption algorithms: AES, ARC2, Blowfish, CAST, DES,
   Triple-DES, IDEA, RC5.

* Stream encryption algorithms: ARC4, simple XOR.

* Public-key algorithms: RSA, DSA, ElGamal, qNEW.

* Protocols: All-or-nothing transforms, chaffing/winnowing.

* Miscellaneous: RFC1751 module for converting 128-key keys into a
   set of English words, primality testing.

* Some demo programs (currently all quite old and outdated).

%setup -n "pycrypto-%{version}"
%patch2 -p1

export CFLAGS="%{optflags} -fno-strict-aliasing"
%__python build

%__python install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=INSTALLED_FILES

%__python test

%{?buildroot:%__rm -rf "%{buildroot}"}