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.

91 lines
2.9 KiB

  1. #
  2. # Copyright (C) 2015-2016 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:=1.9
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=cryptography-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://pypi.python.org/packages/2a/0c/31bd69469e90035381f0197b48bf71032991d9f07a7e444c311b4a23a3df
  13. PKG_HASH:=5518337022718029e367d982642f3e3523541e098ad671672a90b82474c84882
  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. include $(INCLUDE_DIR)/package.mk
  19. $(call include_mk, python-package.mk)
  20. $(call include_mk, python3-package.mk)
  21. PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  22. define Package/python-cryptography/Default
  23. SECTION:=lang
  24. CATEGORY:=Languages
  25. SUBMENU:=Python
  26. URL:=https://github.com/pyca/cryptography
  27. DEPENDS:=+libopenssl
  28. endef
  29. define Package/python-cryptography
  30. $(call Package/python-cryptography/Default)
  31. TITLE:=python-cryptography
  32. DEPENDS+= \
  33. +PACKAGE_python-cryptography:python \
  34. +PACKAGE_python-cryptography:python-cffi \
  35. +PACKAGE_python-cryptography:python-enum34 \
  36. +PACKAGE_python-cryptography:python-idna \
  37. +PACKAGE_python-cryptography:python-ipaddress \
  38. +PACKAGE_python-cryptography:python-pyasn1 \
  39. +PACKAGE_python-cryptography:python-six
  40. VARIANT:=python
  41. endef
  42. define Package/python3-cryptography
  43. $(call Package/python-cryptography/Default)
  44. TITLE:=python3-cryptography
  45. DEPENDS+= \
  46. +PACKAGE_python3-cryptography:python3 \
  47. +PACKAGE_python3-cryptography:python3-cffi \
  48. +PACKAGE_python3-cryptography:python3-idna \
  49. +PACKAGE_python3-cryptography:python3-pyasn1 \
  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. define PyPackage/python-cryptography/filespec
  64. +|$(PYTHON_PKG_DIR)
  65. -|$(PYTHON_PKG_DIR)/cryptography/hazmat/backends/commoncrypto
  66. -|$(PYTHON_PKG_DIR)/cryptography/hazmat/bindings/commoncrypto
  67. endef
  68. define Py3Package/python3-cryptography/filespec
  69. +|$(PYTHON3_PKG_DIR)
  70. -|$(PYTHON3_PKG_DIR)/cryptography/hazmat/backends/commoncrypto
  71. -|$(PYTHON3_PKG_DIR)/cryptography/hazmat/bindings/commoncrypto
  72. endef
  73. $(eval $(call PyPackage,python-cryptography))
  74. $(eval $(call BuildPackage,python-cryptography))
  75. $(eval $(call Py3Package,python3-cryptography))
  76. $(eval $(call BuildPackage,python3-cryptography))