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.

171 lines
4.5 KiB

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