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.

79 lines
2.5 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.6.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=cryptography-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/cryptography
  13. PKG_HASH:=26c821cbeb683facb966045e2064303029d572a87ee69ca5a1bf54bf55f93ca6
  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. 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-cryptography/Default
  23. SECTION:=lang
  24. CATEGORY:=Languages
  25. SUBMENU:=Python
  26. TITLE:=Cryptographic recipes and primitives
  27. URL:=https://github.com/pyca/cryptography
  28. DEPENDS:=+libopenssl
  29. endef
  30. define Package/python-cryptography
  31. $(call Package/python-cryptography/Default)
  32. DEPENDS+= \
  33. +PACKAGE_python-cryptography:python \
  34. +PACKAGE_python-cryptography:python-cffi \
  35. +PACKAGE_python-cryptography:python-enum34 \
  36. +PACKAGE_python-cryptography:python-ipaddress \
  37. +PACKAGE_python-cryptography:python-asn1crypto \
  38. +PACKAGE_python-cryptography:python-six
  39. VARIANT:=python
  40. endef
  41. define Package/python3-cryptography
  42. $(call Package/python-cryptography/Default)
  43. DEPENDS+= \
  44. +PACKAGE_python3-cryptography:python3 \
  45. +PACKAGE_python3-cryptography:python3-cffi \
  46. +PACKAGE_python3-cryptography:python3-asn1crypto \
  47. +PACKAGE_python3-cryptography:python3-six
  48. VARIANT:=python3
  49. endef
  50. define Package/python-cryptography/description
  51. cryptography is a package which provides cryptographic recipes and
  52. primitives to Python developers. Our goal is for it to be your "cryptographic
  53. standard library". It supports Python 2.6-2.7, Python 3.3+, and PyPy 2.6+.
  54. endef
  55. define Package/python3-cryptography/description
  56. $(call Package/python-cryptography/description)
  57. .
  58. (Variant for Python3)
  59. endef
  60. $(eval $(call PyPackage,python-cryptography))
  61. $(eval $(call BuildPackage,python-cryptography))
  62. $(eval $(call BuildPackage,python-cryptography-src))
  63. $(eval $(call Py3Package,python3-cryptography))
  64. $(eval $(call BuildPackage,python3-cryptography))
  65. $(eval $(call BuildPackage,python3-cryptography-src))