You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
2.1 KiB

  1. #
  2. # Copyright (C) 2009-2015, 2017-2018 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=python-crypto
  9. PKG_VERSION:=2.6.1
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=pycrypto-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/
  13. PKG_HASH:=f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-crypto-$(PKG_VERSION)
  15. PKG_LICENSE:=Public Domain
  16. PKG_LICENSE_FILES:=COPYRIGHT
  17. PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
  18. include $(INCLUDE_DIR)/package.mk
  19. include ../python-package.mk
  20. include ../python3-package.mk
  21. PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  22. define Package/python-crypto/Default
  23. SECTION:=lang-python
  24. CATEGORY:=Languages
  25. SUBMENU:=Python
  26. URL:=http://www.pycrypto.org/
  27. endef
  28. define Package/python-crypto
  29. $(call Package/python-crypto/Default)
  30. TITLE:=python-crypto
  31. DEPENDS:=+libgmp +PACKAGE_python-crypto:python
  32. VARIANT:=python
  33. endef
  34. define Package/python3-crypto
  35. $(call Package/python-crypto/Default)
  36. TITLE:=python3-crypto
  37. DEPENDS:=+libgmp +PACKAGE_python3-crypto:python3
  38. VARIANT:=python3
  39. endef
  40. define Package/python-crypto/description
  41. A collection of both secure hash functions (such as MD5 and SHA),
  42. and various encryption algorithms (AES, DES, IDEA, RSA, ElGamal, etc.).
  43. endef
  44. define Package/python3-crypto/description
  45. $(call Package/python-crypto/description)
  46. .
  47. (Variant for Python3)
  48. endef
  49. define PyBuild/Compile
  50. $(call Build/Compile/PyMod,,\
  51. install --prefix=/usr --root=$(PKG_INSTALL_DIR),\
  52. CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" \
  53. )
  54. endef
  55. define Py3Build/Compile
  56. $(call Build/Compile/Py3Mod,,\
  57. install --prefix=/usr --root=$(PKG_INSTALL_DIR),\
  58. CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" \
  59. )
  60. endef
  61. $(eval $(call PyPackage,python-crypto))
  62. $(eval $(call BuildPackage,python-crypto))
  63. $(eval $(call BuildPackage,python-crypto-src))
  64. $(eval $(call Py3Package,python3-crypto))
  65. $(eval $(call BuildPackage,python3-crypto))
  66. $(eval $(call BuildPackage,python3-crypto-src))