Unbundle libtomcrypt (#1087557)

- Unbundle libtomcrypt (#1087557)
- Drop %defattr, redundant since rpm 4.4
f38
Paul Howarth 11 years ago
parent 30f2827e4c
commit 88a061a79f

@ -0,0 +1,30 @@
--- setup.py
+++ setup.py
@@ -390,10 +390,12 @@ kw = {'name':"pycrypto",
include_dirs=['src/'],
sources=["src/CAST.c"]),
Extension("Crypto.Cipher._DES",
- include_dirs=['src/', 'src/libtom/'],
+ include_dirs=['src/'],
+ libraries=['tomcrypt'],
sources=["src/DES.c"]),
Extension("Crypto.Cipher._DES3",
- include_dirs=['src/', 'src/libtom/'],
+ include_dirs=['src/'],
+ libraries=['tomcrypt'],
sources=["src/DES3.c"]),
# Stream ciphers
--- src/DES.c
+++ src/DES.c
@@ -28,8 +28,8 @@
* assert-like LTC_ARGCHK macro fails. */
#define ARGTYPE 4
-/* Include the actial DES implementation */
-#include "libtom/tomcrypt_des.c"
+/* Access the actual DES implementation */
+#include "tomcrypt.h"
#undef DES /* this is needed because tomcrypt_custom.h defines DES to an empty string */

@ -7,7 +7,7 @@
Summary: Cryptography library for Python Summary: Cryptography library for Python
Name: python-crypto Name: python-crypto
Version: 2.6.1 Version: 2.6.1
Release: 2%{?dist} Release: 3%{?dist}
# Mostly Public Domain apart from parts of HMAC.py and setup.py, which are Python # Mostly Public Domain apart from parts of HMAC.py and setup.py, which are Python
License: Public Domain and Python License: Public Domain and Python
Group: Development/Libraries Group: Development/Libraries
@ -15,8 +15,9 @@ URL: http://www.pycrypto.org/
Source0: http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-%{version}.tar.gz Source0: http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-%{version}.tar.gz
Patch0: python-crypto-2.4-optflags.patch Patch0: python-crypto-2.4-optflags.patch
Patch1: python-crypto-2.4-fix-pubkey-size-divisions.patch Patch1: python-crypto-2.4-fix-pubkey-size-divisions.patch
Patch2: pycrypto-2.6.1-unbundle-libtomcrypt.patch
Provides: pycrypto = %{version}-%{release} Provides: pycrypto = %{version}-%{release}
BuildRequires: python2-devel >= 2.2, gmp-devel >= 4.1 BuildRequires: python2-devel >= 2.2, gmp-devel >= 4.1, libtomcrypt-devel >= 1.16
%if %{with_python3} %if %{with_python3}
BuildRequires: python-tools BuildRequires: python-tools
BuildRequires: python3-devel BuildRequires: python3-devel
@ -55,6 +56,10 @@ This is the Python 3 build of the package.
# Fix divisions within benchmarking suite: # Fix divisions within benchmarking suite:
%patch1 -p1 %patch1 -p1
# Unbundle libtomcrypt (#1087557)
rm -rf src/libtom
%patch2
# Prepare python3 build (setup.py doesn't run 2to3 on pct-speedtest.py) # Prepare python3 build (setup.py doesn't run 2to3 on pct-speedtest.py)
%if %{with_python3} %if %{with_python3}
cp -a . %{py3dir} cp -a . %{py3dir}
@ -110,19 +115,21 @@ cd -
rm -rf %{buildroot} rm -rf %{buildroot}
%files -f egg-info %files -f egg-info
%defattr(-,root,root,-)
%doc README TODO ACKS ChangeLog LEGAL/ COPYRIGHT Doc/ %doc README TODO ACKS ChangeLog LEGAL/ COPYRIGHT Doc/
%{python_sitearch}/Crypto/ %{python_sitearch}/Crypto/
%if %{with_python3} %if %{with_python3}
%files -n python3-crypto %files -n python3-crypto
%defattr(-,root,root,-)
%doc README TODO ACKS ChangeLog LEGAL/ COPYRIGHT Doc/ %doc README TODO ACKS ChangeLog LEGAL/ COPYRIGHT Doc/
%{python3_sitearch}/Crypto/ %{python3_sitearch}/Crypto/
%{python3_sitearch}/pycrypto-*py3.*.egg-info %{python3_sitearch}/pycrypto-*py3.*.egg-info
%endif %endif
%changelog %changelog
* Wed May 14 2014 Paul Howarth <paul@city-fan.org> - 2.6.1-3
- Unbundle libtomcrypt (#1087557)
- Drop %%defattr, redundant since rpm 4.4
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.6.1-2 * Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 - Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

Loading…
Cancel
Save