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.

83 lines
2.2 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:=3
  11. PKG_SOURCE:=pycrypto-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/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_CPE_ID:=cpe:/a:dlitz:pycrypto
  18. PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
  19. include $(INCLUDE_DIR)/package.mk
  20. include ../python-package.mk
  21. include ../python3-package.mk
  22. PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  23. define Package/python-crypto/Default
  24. SECTION:=lang-python
  25. CATEGORY:=Languages
  26. SUBMENU:=Python
  27. URL:=https://www.dlitz.net/software/pycrypto/
  28. endef
  29. define Package/python-crypto
  30. $(call Package/python-crypto/Default)
  31. TITLE:=python-crypto
  32. DEPENDS:=+libgmp +PACKAGE_python-crypto:python
  33. VARIANT:=python
  34. endef
  35. define Package/python3-crypto
  36. $(call Package/python-crypto/Default)
  37. TITLE:=python3-crypto
  38. DEPENDS:=+libgmp +PACKAGE_python3-crypto:python3
  39. VARIANT:=python3
  40. endef
  41. define Package/python-crypto/description
  42. A collection of both secure hash functions (such as MD5 and SHA),
  43. and various encryption algorithms (AES, DES, IDEA, RSA, ElGamal, etc.).
  44. endef
  45. define Package/python3-crypto/description
  46. $(call Package/python-crypto/description)
  47. .
  48. (Variant for Python3)
  49. endef
  50. define PyBuild/Compile
  51. $(call Build/Compile/PyMod,,\
  52. install --prefix=/usr --root=$(PKG_INSTALL_DIR),\
  53. CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" \
  54. )
  55. endef
  56. define Py3Build/Compile
  57. $(call Build/Compile/Py3Mod,,\
  58. install --prefix=/usr --root=$(PKG_INSTALL_DIR),\
  59. CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" \
  60. )
  61. endef
  62. $(eval $(call PyPackage,python-crypto))
  63. $(eval $(call BuildPackage,python-crypto))
  64. $(eval $(call BuildPackage,python-crypto-src))
  65. $(eval $(call Py3Package,python3-crypto))
  66. $(eval $(call BuildPackage,python3-crypto))
  67. $(eval $(call BuildPackage,python3-crypto-src))