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.

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