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.

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