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.

102 lines
2.8 KiB

  1. #
  2. # Copyright (C) 2006-2011, 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-twisted
  9. PKG_VERSION:=19.10.0
  10. PKG_RELEASE:=1
  11. PYPI_NAME:=Twisted
  12. PYPI_SOURCE_EXT:=tar.bz2
  13. PKG_HASH:=7394ba7f272ae722a74f3d969dcf599bc4ef093bc392038748a490f1724a515d
  14. PKG_BUILD_DEPENDS:=libtirpc
  15. PKG_LICENSE:=MIT
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
  18. PKG_CPE_ID:=cpe:/a:twistedmatrix:twisted
  19. include ../pypi.mk
  20. include $(INCLUDE_DIR)/package.mk
  21. include ../python-package.mk
  22. include ../python3-package.mk
  23. define Package/python-twisted/Default
  24. SECTION:=lang
  25. CATEGORY:=Languages
  26. SUBMENU:=Python
  27. TITLE:=Asynchronous networking framework
  28. URL:=https://twistedmatrix.com/
  29. endef
  30. define Package/python-twisted
  31. $(call Package/python-twisted/Default)
  32. DEPENDS:= \
  33. +PACKAGE_python-twisted:python-light \
  34. +PACKAGE_python-twisted:python-attrs \
  35. +PACKAGE_python-twisted:python-automat \
  36. +PACKAGE_python-twisted:python-constantly \
  37. +PACKAGE_python-twisted:python-incremental \
  38. +PACKAGE_python-twisted:python-hyperlink \
  39. +PACKAGE_python-twisted:python-setuptools \
  40. +PACKAGE_python-twisted:python-zope-interface
  41. VARIANT:=python
  42. endef
  43. define Package/python3-twisted
  44. $(call Package/python-twisted/Default)
  45. DEPENDS:= \
  46. +PACKAGE_python3-twisted:python3-light \
  47. +PACKAGE_python3-twisted:python3-attrs \
  48. +PACKAGE_python3-twisted:python3-automat \
  49. +PACKAGE_python3-twisted:python3-constantly \
  50. +PACKAGE_python3-twisted:python3-incremental \
  51. +PACKAGE_python3-twisted:python3-hyperlink \
  52. +PACKAGE_python3-twisted:python3-setuptools \
  53. +PACKAGE_python3-twisted:python3-zope-interface
  54. VARIANT:=python3
  55. endef
  56. define Package/python-twisted/description
  57. Twisted is a networking engine written in Python, supporting numerous
  58. protocols. It contains a web server, numerous chat clients, chat servers,
  59. mail servers, and more.
  60. endef
  61. define Package/python3-twisted/description
  62. $(call Package/python-twisted/description)
  63. .
  64. (Variant for Python3)
  65. endef
  66. define PyPackage/python-twisted/filespec
  67. +|$(PYTHON_PKG_DIR)
  68. -|$(PYTHON_PKG_DIR)/twisted/conch/scripts/tkconch.py
  69. endef
  70. define Py3Package/python3-twisted/filespec
  71. +|$(PYTHON3_PKG_DIR)
  72. -|$(PYTHON3_PKG_DIR)/twisted/conch/scripts/tkconch.py
  73. endef
  74. define Py3Package/python3-twisted/install
  75. $(INSTALL_DIR) $(1)/usr/bin
  76. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  77. for bin in $(1)/usr/bin/*; do \
  78. mv $$$$bin $$$${bin}3 ; \
  79. done
  80. endef
  81. $(eval $(call PyPackage,python-twisted))
  82. $(eval $(call BuildPackage,python-twisted))
  83. $(eval $(call BuildPackage,python-twisted-src))
  84. $(eval $(call Py3Package,python3-twisted))
  85. $(eval $(call BuildPackage,python3-twisted))
  86. $(eval $(call BuildPackage,python3-twisted-src))