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.

169 lines
4.5 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=uwsgi
  3. PKG_VERSION:=2.0.18
  4. PKG_RELEASE:=2
  5. PKG_SOURCE:=uwsgi-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL=https://files.pythonhosted.org/packages/source/u/uwsgi/
  7. PKG_HASH:=4972ac538800fb2d421027f49b4a1869b66048839507ccf0aa2fda792d99f583
  8. PKG_BUILD_DIR:=$(BUILD_DIR)/uwsgi-$(PKG_VERSION)
  9. PKG_BUILD_DEPENDS:=python3/host
  10. PYTHON3_PKG_BUILD:=0
  11. PKG_LICENSE:=GPL-2.0-or-later
  12. PKG_LICENSE_FILES:=LICENSE
  13. PKG_MAINTAINER:=Ansuel Smith <ansuelsmth@gmail.com>
  14. include $(INCLUDE_DIR)/package.mk
  15. include ../../lang/python/python3-package.mk
  16. #for LINUX_UNAME_VERSION:
  17. include $(INCLUDE_DIR)/kernel.mk
  18. define Package/uwsgi
  19. SECTION:=net
  20. CATEGORY:=Network
  21. SUBMENU:=Web Servers/Proxies
  22. TITLE:=The uWSGI server
  23. URL:=https://uwsgi-docs.readthedocs.io/en/latest/
  24. DEPENDS:=+libpcre +libcap +libuuid
  25. MENU:=1
  26. endef
  27. define Package/uwsgi-logfile-plugin
  28. SECTION:=net
  29. CATEGORY:=Network
  30. SUBMENU:=Web Servers/Proxies
  31. TITLE:=The Logfile plugin for the uWSGI server
  32. DEPENDS:=uwsgi
  33. MDEPENDS:=uwsgi
  34. endef
  35. define Package/uwsgi-syslog-plugin
  36. SECTION:=net
  37. CATEGORY:=Network
  38. SUBMENU:=Web Servers/Proxies
  39. TITLE:=The Syslog plugin for the uWSGI server
  40. DEPENDS:=uwsgi
  41. MDEPENDS:=uwsgi
  42. endef
  43. define Package/uwsgi-cgi-plugin
  44. SECTION:=net
  45. CATEGORY:=Network
  46. SUBMENU:=Web Servers/Proxies
  47. TITLE:=The CGI plugin for the uWSGI server
  48. DEPENDS:=uwsgi
  49. MDEPENDS:=uwsgi
  50. endef
  51. define Package/uwsgi-python3-plugin
  52. SECTION:=net
  53. CATEGORY:=Network
  54. SUBMENU:=Web Servers/Proxies
  55. TITLE:=The Python3 plugin for the uWSGI server
  56. DEPENDS:=uwsgi +python3-light
  57. MDEPENDS:=uwsgi
  58. endef
  59. define Package/uwsgi-luci-support
  60. SECTION:=net
  61. CATEGORY:=Network
  62. SUBMENU:=Web Servers/Proxies
  63. TITLE:=Support files for LuCI on Nginx
  64. DEPENDS:=uwsgi +uwsgi-syslog-plugin +uwsgi-cgi-plugin
  65. MDEPENDS:=uwsgi
  66. endef
  67. define Package/uwsgi/description
  68. The uWSGI project (to be used together with nginx or nginx-ssl).
  69. endef
  70. define Package/uwsgi-logfile-plugin/description
  71. The Logfile plugin for the uWSGI project.
  72. endef
  73. define Package/uwsgi-syslog-plugin/description
  74. The Syslog plugin for the uWSGI project.
  75. endef
  76. define Package/uwsgi-cgi-plugin/description
  77. The CGI plugin for the uWSGI project.
  78. endef
  79. define Package/uwsgi-python3-plugin/description
  80. The Python3 plugin for the uWSGI project.
  81. endef
  82. define Package/uwsgi-luci-support/description
  83. Support files for LuCI on Nginx
  84. endef
  85. MAKE_VARS+=\
  86. CPP=$(TARGET_CROSS)cpp \
  87. PYTHON=$(STAGING_DIR_HOSTPKG)/bin/python3 \
  88. LINUX_UNAME_VERSION=$(LINUX_UNAME_VERSION)
  89. define Build/Compile
  90. $(call Build/Compile/Default,PROFILE=openwrt)
  91. $(call Build/Compile/Default,plugin.logfile PROFILE=openwrt)
  92. $(call Build/Compile/Default,plugin.syslog PROFILE=openwrt)
  93. $(call Build/Compile/Default,plugin.cgi PROFILE=openwrt)
  94. $(call Python3/Run, \
  95. $(PKG_BUILD_DIR), \
  96. uwsgiconfig.py --plugin plugins/python openwrt, \
  97. CPP="$(TARGET_CROSS)cpp" \
  98. LINUX_UNAME_VERSION=$(LINUX_UNAME_VERSION) \
  99. CFLAGS="$(TARGET_CPPFLAGS) -I$(PYTHON3_INC_DIR) $(TARGET_CFLAGS)" \
  100. )
  101. endef
  102. define Package/uwsgi/install
  103. $(INSTALL_DIR) $(1)/usr/sbin
  104. $(INSTALL_BIN) $(PKG_BUILD_DIR)/uwsgi $(1)/usr/sbin/
  105. $(INSTALL_DIR) $(1)/etc/init.d
  106. $(INSTALL_BIN) ./files/uwsgi.init $(1)/etc/init.d/uwsgi
  107. $(INSTALL_DIR) $(1)/etc/uwsgi
  108. $(INSTALL_CONF) ./files/emperor.ini $(1)/etc/uwsgi/emperor.ini
  109. $(INSTALL_DIR) $(1)/etc/uwsgi/vassals
  110. endef
  111. define Package/uwsgi/conffiles
  112. /etc/uwsgi/emperor.ini
  113. endef
  114. define Package/uwsgi-logfile-plugin/install
  115. $(INSTALL_DIR) $(1)/usr/lib/uwsgi
  116. $(CP) $(PKG_BUILD_DIR)/logfile_plugin.so $(1)/usr/lib/uwsgi/
  117. endef
  118. define Package/uwsgi-syslog-plugin/install
  119. $(INSTALL_DIR) $(1)/usr/lib/uwsgi
  120. $(CP) $(PKG_BUILD_DIR)/syslog_plugin.so $(1)/usr/lib/uwsgi/
  121. endef
  122. define Package/uwsgi-cgi-plugin/install
  123. $(INSTALL_DIR) $(1)/usr/lib/uwsgi
  124. $(CP) $(PKG_BUILD_DIR)/cgi_plugin.so $(1)/usr/lib/uwsgi/
  125. endef
  126. define Package/uwsgi-python3-plugin/install
  127. $(INSTALL_DIR) $(1)/usr/lib/uwsgi
  128. $(INSTALL_BIN) $(PKG_BUILD_DIR)/python_plugin.so $(1)/usr/lib/uwsgi/
  129. endef
  130. define Package/uwsgi-luci-support/install
  131. $(INSTALL_DIR) $(1)/etc/uwsgi/vassals
  132. $(INSTALL_DATA) ./files-luci-support/luci-webui.ini $(1)/etc/uwsgi/vassals/luci-webui.ini
  133. $(INSTALL_DATA) ./files-luci-support/luci-cgi_io.ini $(1)/etc/uwsgi/vassals/luci-cgi_io.ini
  134. endef
  135. $(eval $(call BuildPackage,uwsgi))
  136. $(eval $(call BuildPackage,uwsgi-logfile-plugin))
  137. $(eval $(call BuildPackage,uwsgi-syslog-plugin))
  138. $(eval $(call BuildPackage,uwsgi-cgi-plugin))
  139. $(eval $(call BuildPackage,uwsgi-python3-plugin))
  140. $(eval $(call BuildPackage,uwsgi-luci-support))