python-crypto-vl.spec 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
  2. %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
  3. Summary: Cryptography library for Python
  4. Summary(ja): Python 用 Cryptography ライブラリ
  5. Name: python-crypto
  6. Version: 2.0.1
  7. Release: 3%{?_dist_release}
  8. License: Python License (CNRI Python License)
  9. Group: Development/Libraries
  10. URL: http://www.amk.ca/python/code/crypto.html
  11. Source: http://www.amk.ca/files/python/crypto/pycrypto-2.0.1.tar.gz
  12. Patch0: arc2-buffer-overflow.patch
  13. Patch1: no-usr-local.patch
  14. Patch2: run-tests.patch
  15. BuildRequires: python >= 2.2
  16. BuildRequires: python-devel >= 2.2
  17. BuildRequires: gmp-devel >= 4.1
  18. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  19. %description
  20. Python-crypto is a collection of both secure hash functions
  21. (such as MD5 and SHA), and various encryption algorithms
  22. (AES, DES, IDEA, RSA, ElGamal, etc.).
  23. %prep
  24. %setup -n pycrypto-%{version} -q
  25. %patch0 -p1
  26. %patch1 -p1
  27. %patch2 -p1
  28. sed -i s:/lib:/%_lib:g setup.py
  29. %build
  30. CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
  31. %install
  32. rm -rf $RPM_BUILD_ROOT
  33. %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
  34. find -name "*.py"|xargs %{__perl} -pi -e "s:/usr/local/bin/python:%{__python}:"
  35. %clean
  36. rm -rf $RPM_BUILD_ROOT
  37. %files
  38. %defattr(-,root,root,-)
  39. %doc README TODO ACKS ChangeLog LICENSE Doc
  40. %{python_sitearch}/Crypto/*.py*
  41. %{python_sitearch}/Crypto/Cipher/*.so
  42. %{python_sitearch}/Crypto/Cipher/*.py*
  43. %{python_sitearch}/Crypto/Hash/*.so
  44. %{python_sitearch}/Crypto/Hash/*.py*
  45. %{python_sitearch}/Crypto/Protocol/*.py*
  46. %{python_sitearch}/Crypto/PublicKey/*.so
  47. %{python_sitearch}/Crypto/PublicKey/*.py*
  48. %{python_sitearch}/Crypto/Util/*.py*
  49. %{python_sitearch}/*.egg-info
  50. %dir %{python_sitearch}/Crypto/Cipher/
  51. %dir %{python_sitearch}/Crypto/Hash/
  52. %dir %{python_sitearch}/Crypto/Protocol/
  53. %dir %{python_sitearch}/Crypto/PublicKey/
  54. %dir %{python_sitearch}/Crypto/Util/
  55. %changelog
  56. * Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 2.0.1-3
  57. - rebuild with python-2.6
  58. * Fri Oct 23 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.0.1-2
  59. - added Patch0,1,2 from Debian to fix some problem
  60. * Wed Jul 29 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.0.1-1
  61. - initial build for VineSeed
  62. * Mon Jun 04 2007 David Woodhouse <dwmw2@infradead.org> - 2.0.1-7.1
  63. - Fix libdir handling so it works on more arches than x86_64
  64. * Wed Apr 18 2007 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 2.0.1-7
  65. - Fix typo
  66. * Wed Apr 18 2007 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 2.0.1-6
  67. - Remove dist
  68. - rebuild, because the older version was much bigger, as it was build when
  69. distutils was doing static links of libpython
  70. * Sat Dec 09 2006 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 2.0.1-5
  71. - Rebuild for python 2.5
  72. * Thu Sep 07 2006 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 2.0.1-4
  73. - Don't ghost pyo files (#205408)
  74. * Tue Aug 29 2006 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 2.0.1-3
  75. - Rebuild for Fedora Extras 6
  76. * Mon Feb 13 2006 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 2.0.1-2
  77. - Rebuild for Fedora Extras 5
  78. * Wed Aug 17 2005 Thorsten Leemhuis <fedora at leemhuis dot info> - 0:2.0.1-1
  79. - Update to 2.0.1
  80. - Use Dist
  81. - Drop python-crypto-64bit-unclean.patch, similar patch was applied
  82. upstream
  83. * Thu May 05 2005 Thorsten Leemhuis <fedora at leemhuis dot info> - 0:2.0-4
  84. - add python-crypto-64bit-unclean.patch (#156173)
  85. * Mon Mar 21 2005 Seth Vidal <skvidal at phy.duke.edu> - 0:2.0-3
  86. - iterate release for build on python 2.4 based systems
  87. * Sat Dec 18 2004 Thorsten Leemhuis <fedora at leemhuis dot info> - 0:2.0-2
  88. - Fix build on x86_64: use python_sitearch for files and patch source
  89. to find gmp
  90. * Thu Aug 26 2004 Thorsten Leemhuis <fedora at leemhuis dot info> - 0:2.0-0.fdr.1
  91. - Update to 2.00
  92. * Fri Aug 13 2004 Ville Skytta <ville.skytta at iki.fi> - 0:1.9-0.fdr.6.a6
  93. - Don't use get_python_version(), it's available in Python >= 2.3 only.
  94. * Thu Aug 12 2004 Thorsten Leemhuis <fedora at leemhuis dot info> 0:1.9-0.fdr.5.a6
  95. - Own dir python_sitearch/Crypto/
  96. * Wed Aug 11 2004 Thorsten Leemhuis <fedora at leemhuis dot info> 0:1.9-0.fdr.4.a6
  97. - Match python spec template more
  98. * Sat Jul 17 2004 Thorsten Leemhuis <fedora at leemhuis dot info> 0:1.9-0.fdr.3.a6
  99. - Own _libdir/python/site-packages/Crypto/
  100. * Wed Mar 24 2004 Panu Matilainen <pmatilai@welho.com> 0.3.2-0.fdr.2.a6
  101. - generate .pyo files during install
  102. - require exact version of python used to build the package
  103. - include more docs + demos
  104. - fix dependency on /usr/local/bin/python
  105. - use fedora.us style buildroot
  106. - buildrequires gmp-devel
  107. - use description from README
  108. * Sun Jan 11 2004 Ryan Boder <icanoop@bitwiser.org> 0.3.2-0.fdr.1.a6
  109. - Initial build.