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.6 KiB

  1. #
  2. # Copyright (C) 2015-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-cryptography
  9. PKG_VERSION:=2.7
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=cryptography-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/cryptography
  13. PKG_HASH:=e6347742ac8f35ded4a46ff835c60e68c22a536a8ae5c4422966d06946b6d4c6
  14. PKG_LICENSE:=Apache-2.0 BSD-3-Clause
  15. PKG_LICENSE_FILES:=LICENSE.APACHE LICENSE.BSD
  16. PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleanalex@gmail.com>
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cryptography-$(PKG_VERSION)
  18. PKG_BUILD_DEPENDS:=libffi/host
  19. HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="cffi>=1.8,!=1.11.3"
  20. HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi>=1.8,!=1.11.3"
  21. include $(INCLUDE_DIR)/package.mk
  22. include ../python-package.mk
  23. include ../python3-package.mk
  24. PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  25. define Package/python-cryptography/Default
  26. SECTION:=lang
  27. CATEGORY:=Languages
  28. SUBMENU:=Python
  29. TITLE:=Cryptographic recipes and primitives
  30. URL:=https://github.com/pyca/cryptography
  31. DEPENDS:=+libopenssl
  32. endef
  33. define Package/python-cryptography
  34. $(call Package/python-cryptography/Default)
  35. DEPENDS+= \
  36. +PACKAGE_python-cryptography:python \
  37. +PACKAGE_python-cryptography:python-cffi \
  38. +PACKAGE_python-cryptography:python-enum34 \
  39. +PACKAGE_python-cryptography:python-ipaddress \
  40. +PACKAGE_python-cryptography:python-asn1crypto \
  41. +PACKAGE_python-cryptography:python-six
  42. VARIANT:=python
  43. endef
  44. define Package/python3-cryptography
  45. $(call Package/python-cryptography/Default)
  46. DEPENDS+= \
  47. +PACKAGE_python3-cryptography:python3 \
  48. +PACKAGE_python3-cryptography:python3-cffi \
  49. +PACKAGE_python3-cryptography:python3-asn1crypto \
  50. +PACKAGE_python3-cryptography:python3-six
  51. VARIANT:=python3
  52. endef
  53. define Package/python-cryptography/description
  54. cryptography is a package which provides cryptographic recipes and
  55. primitives to Python developers. Our goal is for it to be your "cryptographic
  56. standard library". It supports Python 2.6-2.7, Python 3.3+, and PyPy 2.6+.
  57. endef
  58. define Package/python3-cryptography/description
  59. $(call Package/python-cryptography/description)
  60. .
  61. (Variant for Python3)
  62. endef
  63. $(eval $(call PyPackage,python-cryptography))
  64. $(eval $(call BuildPackage,python-cryptography))
  65. $(eval $(call BuildPackage,python-cryptography-src))
  66. $(eval $(call Py3Package,python3-cryptography))
  67. $(eval $(call BuildPackage,python3-cryptography))
  68. $(eval $(call BuildPackage,python3-cryptography-src))