python-pycrypto.mk 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. ################################################################################
  2. #
  3. # python-pycrypto
  4. #
  5. ################################################################################
  6. PYTHON_PYCRYPTO_VERSION = 2.6.1
  7. PYTHON_PYCRYPTO_SOURCE = pycrypto-$(PYTHON_PYCRYPTO_VERSION).tar.gz
  8. PYTHON_PYCRYPTO_SITE = http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto
  9. PYTHON_PYCRYPTO_SETUP_TYPE = distutils
  10. PYTHON_PYCRYPTO_LICENSE = Public Domain, Python 2.2 License (HMAC.py, setup.py)
  11. PYTHON_PYCRYPTO_LICENSE_FILES = \
  12. COPYRIGHT LEGAL/copy/LICENSE.libtom \
  13. LEGAL/copy/LICENSE.python-2.2
  14. # The pycrypto package contains a LICENSE.orig file, but our patching
  15. # infrastrucure removes all .orig file, so we must rename that license
  16. # file prior to patching, so it is still available to the legal-info
  17. # infrastructure
  18. define PYTHON_PYCRYPTO_RENAME_LICENSE
  19. mv $(@D)/LEGAL/copy/LICENSE.orig $(@D)/LEGAL/copy/LICENSE.original
  20. endef
  21. PYTHON_PYCRYPTO_POST_EXTRACT_HOOKS += PYTHON_PYCRYPTO_RENAME_LICENSE
  22. HOST_PYTHON_PYCRYPTO_POST_EXTRACT_HOOKS += PYTHON_PYCRYPTO_RENAME_LICENSE
  23. PYTHON_PYCRYPTO_LICENSE_FILES += LEGAL/copy/LICENSE.original
  24. PYTHON_PYCRYPTO_DEPENDENCIES = gmp
  25. HOST_PYTHON_PYCRYPTO_DEPENDENCIES = host-gmp
  26. # The configure step needs to be run outside of the setup.py since it isn't
  27. # run correctly for cross-compiling
  28. define PYTHON_PYCRYPTO_CONFIGURE_CMDS
  29. (cd $(@D) && \
  30. $(TARGET_CONFIGURE_OPTS) \
  31. $(TARGET_CONFIGURE_ARGS) \
  32. ./configure \
  33. --target=$(GNU_TARGET_NAME) \
  34. --host=$(GNU_TARGET_NAME) \
  35. --build=$(GNU_HOST_NAME) \
  36. --prefix=/usr \
  37. --exec-prefix=/usr \
  38. --sysconfdir=/etc \
  39. --program-prefix="" \
  40. )
  41. endef
  42. $(eval $(python-package))
  43. $(eval $(host-python-package))