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.

120 lines
2.9 KiB

  1. #
  2. # Copyright (C) 2007-2017 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:=gunicorn
  9. PKG_VERSION:=19.9.0
  10. PKG_RELEASE=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/g/gunicorn
  13. PKG_HASH:=fa2662097c66f920f53f70621c6c58ca4a3c4d3434205e608e121b5b3b71f4f3
  14. PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
  15. PKG_LICENSE:=MIT
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(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/gunicorn/Default
  23. SUBMENU:=Python
  24. SECTION:=lang
  25. CATEGORY:=Languages
  26. TITLE:=WSGI HTTP Server for UNIX
  27. URL:=https://gunicorn.org
  28. endef
  29. define Package/python-gunicorn
  30. $(call Package/gunicorn/Default)
  31. DEPENDS:=+python
  32. VARIANT:=python
  33. endef
  34. define Package/python-gunicorn/description
  35. WSGI HTTP Server for UNIX (libraries)
  36. endef
  37. define PyPackage/python-gunicorn/filespec
  38. +|$(PYTHON_PKG_DIR)
  39. -|$(PYTHON_PKG_DIR)/gunicorn/workers/_gaiohttp.py
  40. endef
  41. define Package/python3-gunicorn
  42. $(call Package/gunicorn/Default)
  43. DEPENDS:=+python3
  44. VARIANT:=python3
  45. endef
  46. define Package/python3-gunicorn/description
  47. $(call define Package/python-gunicorn/description)
  48. .
  49. (Variant for Python3)
  50. endef
  51. # Make sure that the binaries are not installed with the libraries
  52. # That means adding some empty Py[3]Package/gunicorn[3]/install rules
  53. define PyPackage/python-gunicorn/install
  54. :
  55. endef
  56. define Py3Package/python3-gunicorn/install
  57. :
  58. endef
  59. define Package/gunicorn
  60. $(call Package/gunicorn/Default)
  61. DEPENDS:=+python +python-pkg-resources +python-gunicorn
  62. endef
  63. define Package/gunicorn/description
  64. WSGI HTTP Server for UNIX (daemon)
  65. endef
  66. define Package/gunicorn/install
  67. $(INSTALL_DIR) $(1)/usr/bin
  68. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  69. $(call PyShebang,$(1)/usr/bin/*)
  70. endef
  71. define Package/gunicorn3
  72. $(call Package/gunicorn/Default)
  73. DEPENDS:=+python3 +python3-pkg-resources +python3-gunicorn
  74. endef
  75. define Package/gunicorn3/description
  76. $(call define Package/gunicorn/description)
  77. .
  78. (Variant for Python3)
  79. endef
  80. define Package/gunicorn3/install
  81. $(INSTALL_DIR) $(1)/usr/bin
  82. $(INSTALL_BIN) \
  83. $(PKG_INSTALL_DIR)/usr/bin/gunicorn \
  84. $(1)/usr/bin/gunicorn3
  85. $(INSTALL_BIN) \
  86. $(PKG_INSTALL_DIR)/usr/bin/gunicorn_paster \
  87. $(1)/usr/bin/gunicorn3_paster
  88. $(call Py3Shebang,$(1)/usr/bin/*)
  89. endef
  90. $(eval $(call PyPackage,python-gunicorn))
  91. $(eval $(call BuildPackage,python-gunicorn))
  92. $(eval $(call BuildPackage,python-gunicorn-src))
  93. $(eval $(call BuildPackage,gunicorn))
  94. $(eval $(call Py3Package,python3-gunicorn))
  95. $(eval $(call BuildPackage,python3-gunicorn))
  96. $(eval $(call BuildPackage,python3-gunicorn-src))
  97. $(eval $(call BuildPackage,gunicorn3))