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.

501 lines
16 KiB

  1. #
  2. # Copyright (C) 2012-2016 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:=nginx
  9. PKG_VERSION:=1.15.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://nginx.org/download/
  13. PKG_HASH:=b0b58c9a3fd73aa8b89edf5cfadc6641a352e0e6d3071db1eb3215d72b7fb516
  14. PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de> \
  15. Ansuel Smith <ansuelsmth@gmail.com>
  16. PKG_LICENSE:=2-clause BSD-like license
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  18. PKG_FIXUP:=autoreconf
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_INSTALL:=1
  21. PKG_CONFIG_DEPENDS := \
  22. CONFIG_NGINX_SSL \
  23. CONFIG_NGINX_DAV \
  24. CONFIG_NGINX_FLV \
  25. CONFIG_NGINX_STUB_STATUS \
  26. CONFIG_NGINX_HTTP_CHARSET \
  27. CONFIG_NGINX_HTTP_GZIP \
  28. CONFIG_NGINX_HTTP_SSI \
  29. CONFIG_NGINX_HTTP_USERID \
  30. CONFIG_NGINX_HTTP_ACCESS \
  31. CONFIG_NGINX_HTTP_AUTH_BASIC \
  32. CONFIG_NGINX_HTTP_AUTH_REQUEST \
  33. CONFIG_NGINX_HTTP_AUTOINDEX \
  34. CONFIG_NGINX_HTTP_GEO \
  35. CONFIG_NGINX_HTTP_MAP \
  36. CONFIG_NGINX_HTTP_SPLIT_CLIENTS \
  37. CONFIG_NGINX_HTTP_REFERER \
  38. CONFIG_NGINX_HTTP_REWRITE \
  39. CONFIG_NGINX_HTTP_PROXY \
  40. CONFIG_NGINX_HTTP_FASTCGI \
  41. CONFIG_NGINX_HTTP_UWSGI \
  42. CONFIG_NGINX_HTTP_SCGI \
  43. CONFIG_NGINX_HTTP_MEMCACHED \
  44. CONFIG_NGINX_HTTP_LIMIT_CONN \
  45. CONFIG_NGINX_HTTP_LIMIT_REQ \
  46. CONFIG_NGINX_HTTP_EMPTY_GIF \
  47. CONFIG_NGINX_HTTP_BROWSER \
  48. CONFIG_NGINX_HTTP_UPSTREAM_HASH \
  49. CONFIG_NGINX_HTTP_UPSTREAM_IP_HASH \
  50. CONFIG_NGINX_HTTP_UPSTREAM_LEAST_CONN \
  51. CONFIG_NGINX_HTTP_UPSTREAM_KEEPALIVE \
  52. CONFIG_NGINX_HTTP_UPSTREAM_ZONE \
  53. CONFIG_NGINX_HTTP_CACHE \
  54. CONFIG_NGINX_HTTP_V2 \
  55. CONFIG_NGINX_PCRE \
  56. CONFIG_NGINX_NAXSI \
  57. CONFIG_NGINX_LUA \
  58. CONFIG_NGINX_HTTP_REAL_IP \
  59. CONFIG_NGINX_HTTP_SECURE_LINK \
  60. CONFIG_NGINX_HTTP_BROTLI \
  61. CONFIG_NGINX_HEADERS_MORE \
  62. CONFIG_NGINX_RTMP_MODULE \
  63. CONFIG_NGINX_TS_MODULE \
  64. include $(INCLUDE_DIR)/package.mk
  65. define Package/nginx/default
  66. SECTION:=net
  67. CATEGORY:=Network
  68. SUBMENU:=Web Servers/Proxies
  69. TITLE:=Nginx web server
  70. URL:=http://nginx.org/
  71. DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl \
  72. +NGINX_HTTP_GZIP:zlib +NGINX_LUA:liblua +libpthread
  73. endef
  74. define Package/nginx/description
  75. nginx is an HTTP and reverse proxy server, as well as a mail proxy server, \
  76. written by Igor Sysoev. (Some module require SSL module enable to show up in \
  77. config menu)
  78. endef
  79. define Package/nginx
  80. $(Package/nginx/default)
  81. VARIANT:=no-ssl
  82. endef
  83. define Package/nginx-ssl
  84. $(Package/nginx/default)
  85. TITLE += with SSL support
  86. DEPENDS +=+libopenssl
  87. VARIANT:=ssl
  88. endef
  89. Package/nginx-ssl/description = $(Package/nginx/description) \
  90. This varian is compiled with SSL support enabled. To enable additional module \
  91. select them in the nginx default configuration menu.
  92. define Package/nginx-all-module
  93. $(Package/nginx/default)
  94. TITLE += with ALL module selected
  95. DEPENDS:=+libpcre +libopenssl +zlib +liblua +libpthread
  96. VARIANT:=all-module
  97. endef
  98. Package/nginx-all-module/description = $(Package/nginx/description) \
  99. This varian is compiled with ALL module selected.
  100. define Package/nginx/config
  101. source "$(SOURCE)/Config.in"
  102. endef
  103. define Package/nginx-ssl/config
  104. source "$(SOURCE)/Config_ssl.in"
  105. endef
  106. config_files=nginx.conf mime.types
  107. define Package/nginx/conffiles
  108. /etc/nginx/
  109. endef
  110. Package/nginx-ssl/conffiles = $(Package/nginx/conffiles)
  111. Package/nginx-all-module/conffiles = $(Package/nginx/conffiles)
  112. ADDITIONAL_MODULES:=
  113. ifneq ($(BUILD_VARIANT),all-module)
  114. ifneq ($(CONFIG_NGINX_HTTP_CACHE),y)
  115. ADDITIONAL_MODULES += --without-http-cache
  116. endif
  117. ifneq ($(CONFIG_NGINX_PCRE),y)
  118. ADDITIONAL_MODULES += --without-pcre
  119. endif
  120. ifneq ($(CONFIG_NGINX_HTTP_CHARSET),y)
  121. ADDITIONAL_MODULES += --without-http_charset_module
  122. else
  123. config_files += koi-utf koi-win win-utf
  124. endif
  125. ifneq ($(CONFIG_NGINX_HTTP_GZIP),y)
  126. ADDITIONAL_MODULES += --without-http_gzip_module
  127. endif
  128. ifneq ($(CONFIG_NGINX_HTTP_SSI),y)
  129. ADDITIONAL_MODULES += --without-http_ssi_module
  130. endif
  131. ifneq ($(CONFIG_NGINX_HTTP_USERID),y)
  132. ADDITIONAL_MODULES += --without-http_userid_module
  133. endif
  134. ifneq ($(CONFIG_NGINX_HTTP_ACCESS),y)
  135. ADDITIONAL_MODULES += --without-http_access_module
  136. endif
  137. ifneq ($(CONFIG_NGINX_HTTP_AUTH_BASIC),y)
  138. ADDITIONAL_MODULES += --without-http_auth_basic_module
  139. endif
  140. ifneq ($(CONFIG_NGINX_HTTP_AUTOINDEX),y)
  141. ADDITIONAL_MODULES += --without-http_autoindex_module
  142. endif
  143. ifneq ($(CONFIG_NGINX_HTTP_GEO),y)
  144. ADDITIONAL_MODULES += --without-http_geo_module
  145. endif
  146. ifneq ($(CONFIG_NGINX_HTTP_MAP),y)
  147. ADDITIONAL_MODULES += --without-http_map_module
  148. endif
  149. ifneq ($(CONFIG_NGINX_HTTP_SPLIT_CLIENTS),y)
  150. ADDITIONAL_MODULES += --without-http_split_clients_module
  151. endif
  152. ifneq ($(CONFIG_NGINX_HTTP_REFERER),y)
  153. ADDITIONAL_MODULES += --without-http_referer_module
  154. endif
  155. ifneq ($(CONFIG_NGINX_HTTP_REWRITE),y)
  156. ADDITIONAL_MODULES += --without-http_rewrite_module
  157. endif
  158. ifneq ($(CONFIG_NGINX_HTTP_PROXY),y)
  159. ADDITIONAL_MODULES += --without-http_proxy_module
  160. endif
  161. ifneq ($(CONFIG_NGINX_HTTP_FASTCGI),y)
  162. ADDITIONAL_MODULES += --without-http_fastcgi_module
  163. else
  164. config_files += fastcgi_params
  165. endif
  166. ifneq ($(CONFIG_NGINX_HTTP_UWSGI),y)
  167. ADDITIONAL_MODULES += --without-http_uwsgi_module
  168. endif
  169. ifneq ($(CONFIG_NGINX_HTTP_SCGI),y)
  170. ADDITIONAL_MODULES += --without-http_scgi_module
  171. endif
  172. ifneq ($(CONFIG_NGINX_HTTP_MEMCACHED),y)
  173. ADDITIONAL_MODULES += --without-http_memcached_module
  174. endif
  175. ifneq ($(CONFIG_NGINX_HTTP_LIMIT_CONN),y)
  176. ADDITIONAL_MODULES += --without-http_limit_conn_module
  177. endif
  178. ifneq ($(CONFIG_NGINX_HTTP_LIMIT_REQ),y)
  179. ADDITIONAL_MODULES += --without-http_limit_req_module
  180. endif
  181. ifneq ($(CONFIG_NGINX_HTTP_EMPTY_GIF),y)
  182. ADDITIONAL_MODULES += --without-http_empty_gif_module
  183. endif
  184. ifneq ($(CONFIG_NGINX_HTTP_BROWSER),y)
  185. ADDITIONAL_MODULES += --without-http_browser_module
  186. endif
  187. ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_HASH),y)
  188. ADDITIONAL_MODULES += --without-http_upstream_hash_module
  189. endif
  190. ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_IP_HASH),y)
  191. ADDITIONAL_MODULES += --without-http_upstream_ip_hash_module
  192. endif
  193. ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_LEAST_CONN),y)
  194. ADDITIONAL_MODULES += --without-http_upstream_least_conn_module
  195. endif
  196. ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_KEEPALIVE),y)
  197. ADDITIONAL_MODULES += --without-http_upstream_keepalive_module
  198. endif
  199. ifeq ($(BUILD_VARIANT),ssl)
  200. ifneq ($(CONFIG_NGINX_SSL),y)
  201. ADDITIONAL_MODULES += --with-http_ssl_module
  202. endif
  203. endif
  204. ifeq ($(CONFIG_NGINX_SSL),y)
  205. ADDITIONAL_MODULES += --with-http_ssl_module
  206. endif
  207. ifeq ($(CONFIG_NGINX_NAXSI),y)
  208. ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-naxsi/naxsi_src
  209. endif
  210. ifeq ($(CONFIG_NGINX_LUA),y)
  211. ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/lua-nginx
  212. endif
  213. ifeq ($(CONFIG_IPV6),y)
  214. ADDITIONAL_MODULES += --with-ipv6
  215. endif
  216. ifeq ($(CONFIG_NGINX_STUB_STATUS),y)
  217. ADDITIONAL_MODULES += --with-http_stub_status_module
  218. endif
  219. ifeq ($(CONFIG_NGINX_FLV),y)
  220. ADDITIONAL_MODULES += --with-http_flv_module
  221. endif
  222. ifeq ($(CONFIG_NGINX_DAV),y)
  223. ADDITIONAL_MODULES += --with-http_dav_module
  224. endif
  225. ifeq ($(CONFIG_NGINX_HTTP_AUTH_REQUEST),y)
  226. ADDITIONAL_MODULES += --with-http_auth_request_module
  227. endif
  228. ifeq ($(CONFIG_NGINX_HTTP_V2),y)
  229. ADDITIONAL_MODULES += --with-http_v2_module
  230. endif
  231. ifeq ($(CONFIG_NGINX_HTTP_REAL_IP),y)
  232. ADDITIONAL_MODULES += --with-http_realip_module
  233. endif
  234. ifeq ($(CONFIG_NGINX_HTTP_SECURE_LINK),y)
  235. ADDITIONAL_MODULES += --with-http_secure_link_module
  236. endif
  237. ifeq ($(CONFIG_NGINX_HEADERS_MORE),y)
  238. ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-headers-more
  239. endif
  240. ifeq ($(CONFIG_NGINX_HTTP_BROTLI),y)
  241. ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-brotli
  242. endif
  243. ifeq ($(CONFIG_NGINX_RTMP_MODULE),y)
  244. ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-rtmp
  245. endif
  246. ifeq ($(CONFIG_NGINX_TS_MODULE),y)
  247. ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-ts
  248. endif
  249. else
  250. CONFIG_NGINX_HEADERS_MORE:=y
  251. CONFIG_NGINX_HTTP_BROTLI:=y
  252. CONFIG_NGINX_RTMP_MODULE:=y
  253. CONFIG_NGINX_TS_MODULE:=y
  254. CONFIG_NGINX_NAXSI:=y
  255. CONFIG_NGINX_LUA:=y
  256. ADDITIONAL_MODULES += --with-http_ssl_module --add-module=$(PKG_BUILD_DIR)/nginx-naxsi/naxsi_src \
  257. --add-module=$(PKG_BUILD_DIR)/lua-nginx --with-ipv6 --with-http_stub_status_module --with-http_flv_module \
  258. --with-http_dav_module --with-http_auth_request_module --with-http_v2_module --with-http_realip_module \
  259. --with-http_secure_link_module --add-module=$(PKG_BUILD_DIR)/nginx-headers-more \
  260. --add-module=$(PKG_BUILD_DIR)/nginx-brotli --add-module=$(PKG_BUILD_DIR)/nginx-rtmp \
  261. --add-module=$(PKG_BUILD_DIR)/nginx-ts
  262. config_files += koi-utf koi-win win-utf fastcgi_params
  263. endif
  264. define Package/nginx-mod-luci/default
  265. TITLE:=Nginx on LuCI
  266. SECTION:=net
  267. CATEGORY:=Network
  268. SUBMENU:=Web Servers/Proxies
  269. TITLE:=Support file for Nginx
  270. URL:=http://nginx.org/
  271. DEPENDS:=+uwsgi-cgi +uwsgi-cgi-luci-support
  272. endef
  273. define Package/nginx-mod-luci
  274. $(Package/nginx-mod-luci/default)
  275. DEPENDS += +nginx
  276. endef
  277. define Package/nginx-mod-luci/description
  278. Support file for LuCI in nginx. Include custom nginx configuration, autostart script for uwsgi.
  279. endef
  280. define Package/nginx-mod-luci-ssl
  281. $(Package/nginx-mod-luci/default)
  282. TITLE += with HTTPS support
  283. DEPENDS += +nginx-ssl
  284. endef
  285. Package/nginx-mod-luci-ssl/description = $(define Package/nginx-mod-luci/description) \
  286. This also include redirect from http to https and cert autogeneration.
  287. TARGET_CFLAGS += -fvisibility=hidden -ffunction-sections -fdata-sections -DNGX_LUA_NO_BY_LUA_BLOCK
  288. TARGET_LDFLAGS += -Wl,--gc-sections
  289. ifeq ($(CONFIG_NGINX_LUA),y)
  290. CONFIGURE_VARS += LUA_INC=$(STAGING_DIR)/usr/include \
  291. LUA_LIB=$(STAGING_DIR)/usr/lib
  292. endif
  293. CONFIGURE_ARGS += \
  294. --crossbuild=Linux::$(ARCH) \
  295. --prefix=/usr \
  296. --conf-path=/etc/nginx/nginx.conf \
  297. $(ADDITIONAL_MODULES) \
  298. --error-log-path=/var/log/nginx/error.log \
  299. --pid-path=/var/run/nginx.pid \
  300. --lock-path=/var/lock/nginx.lock \
  301. --http-log-path=/var/log/nginx/access.log \
  302. --http-client-body-temp-path=/var/lib/nginx/body \
  303. --http-proxy-temp-path=/var/lib/nginx/proxy \
  304. --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
  305. --with-cc="$(TARGET_CC)" \
  306. --with-cc-opt="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
  307. --with-ld-opt="$(TARGET_LDFLAGS)" \
  308. --without-http_upstream_zone_module
  309. define Package/nginx-mod-luci/install
  310. $(INSTALL_DIR) $(1)/etc/nginx
  311. $(INSTALL_BIN) ./files-luci-support/luci_uwsgi.conf $(1)/etc/nginx/luci_uwsgi.conf
  312. $(INSTALL_BIN) ./files-luci-support/luci_nginx.conf $(1)/etc/nginx/luci_nginx.conf
  313. $(INSTALL_DIR) $(1)/etc/uci-defaults
  314. $(INSTALL_BIN) ./files-luci-support/60_nginx-luci-support $(1)/etc/uci-defaults/60_nginx-luci-support
  315. endef
  316. define Package/nginx-mod-luci-ssl/install
  317. $(Package/nginx-mod-luci/install)
  318. $(INSTALL_DIR) $(1)/etc/nginx
  319. $(INSTALL_BIN) ./files-luci-support/luci_nginx_ssl.conf $(1)/etc/nginx/luci_nginx_ssl.conf
  320. $(INSTALL_DIR) $(1)/etc/uci-defaults
  321. $(INSTALL_BIN) ./files-luci-support/70_nginx-luci-support-ssl $(1)/etc/uci-defaults/70_nginx-luci-support-ssl
  322. endef
  323. define Package/nginx/install
  324. $(INSTALL_DIR) $(1)/usr/sbin
  325. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nginx $(1)/usr/sbin/
  326. $(INSTALL_DIR) $(1)/etc/nginx
  327. $(INSTALL_DATA) $(addprefix $(PKG_INSTALL_DIR)/etc/nginx/,$(config_files)) $(1)/etc/nginx/
  328. $(INSTALL_DIR) $(1)/etc/init.d
  329. $(INSTALL_BIN) ./files/nginx.init $(1)/etc/init.d/nginx
  330. ifeq ($(CONFIG_NGINX_NAXSI),y)
  331. $(INSTALL_DIR) $(1)/etc/nginx
  332. $(INSTALL_BIN) $(PKG_BUILD_DIR)/nginx-naxsi/naxsi_config/naxsi_core.rules $(1)/etc/nginx
  333. chmod 0640 $(1)/etc/nginx/naxsi_core.rules
  334. endif
  335. $(if $(CONFIG_NGINX_NAXSI),$($(INSTALL_BIN) $(PKG_BUILD_DIR)/nginx-naxsi/naxsi_config/naxsi_core.rules $(1)/etc/nginx))
  336. $(if $(CONFIG_NGINX_NAXSI),$(chmod 0640 $(1)/etc/nginx/naxsi_core.rules))
  337. endef
  338. Package/nginx-ssl/install = $(Package/nginx/install)
  339. Package/nginx-all-module/install = $(Package/nginx/install)
  340. define Build/Prepare
  341. $(Build/Prepare/Default)
  342. $(Prepare/nginx-naxsi)
  343. $(Prepare/lua-nginx)
  344. $(Prepare/nginx-brotli)
  345. $(Prepare/nginx-headers-more)
  346. $(Prepare/nginx-rtmp)
  347. $(Prepare/nginx-ts)
  348. endef
  349. ifeq ($(CONFIG_NGINX_HEADERS_MORE),y)
  350. define Download/nginx-headers-more
  351. VERSION:=a9f7c7e86cc7441d04e2f11f01c2e3a9c4b0301d
  352. SUBDIR:=nginx-headers-more
  353. FILE:=headers-more-nginx-module-$(PKG_VERSION)-$$(VERSION).tar.gz
  354. URL:=https://github.com/openresty/headers-more-nginx-module.git
  355. MIRROR_HASH:=432609015719aaa7241e5166c7cda427acbe004f725887f78ef629d51bd9cb3f
  356. PROTO:=git
  357. endef
  358. $(eval $(call Download,nginx-headers-more))
  359. define Prepare/nginx-headers-more
  360. $(eval $(Download/nginx-headers-more))
  361. gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  362. endef
  363. endif
  364. ifeq ($(CONFIG_NGINX_HTTP_BROTLI),y)
  365. define Download/nginx-brotli
  366. VERSION:=e26248ee361c04e25f581b92b85d95681bdffb39
  367. SUBDIR:=nginx-brotli
  368. FILE:=ngx-brotli-module-$(PKG_VERSION)-$$(VERSION).tar.gz
  369. URL:=https://github.com/eustas/ngx_brotli.git
  370. MIRROR_HASH:=76b891ba49f82f0cfbc9cba875646e26ee986b522373e0aa2698a9923a4adcdb
  371. PROTO:=git
  372. endef
  373. $(eval $(call Download,nginx-brotli))
  374. define Prepare/nginx-brotli
  375. $(eval $(Download/nginx-brotli))
  376. gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  377. endef
  378. endif
  379. ifeq ($(CONFIG_NGINX_RTMP_MODULE),y)
  380. define Download/nginx-rtmp
  381. VERSION:=791b6136f02bc9613daf178723ac09f4df5a3bbf
  382. SUBDIR:=nginx-rtmp
  383. FILE:=ngx-rtmp-module-$(PKG_VERSION)-$$(VERSION).tar.gz
  384. URL:=https://github.com/arut/nginx-rtmp-module.git
  385. MIRROR_HASH:=8db3f7b545ce98f47415e0436e12dfb55ae787afd3cd9515b5642c7b9dc0ef00
  386. PROTO:=git
  387. endef
  388. $(eval $(call Download,nginx-rtmp))
  389. define Prepare/nginx-rtmp
  390. $(eval $(call Download,nginx-rtmp))
  391. gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  392. endef
  393. endif
  394. ifeq ($(CONFIG_NGINX_TS_MODULE),y)
  395. define Download/nginx-ts
  396. VERSION:=ef2f874d95cc75747eb625a292524a702aefb0fd
  397. SUBDIR:=nginx-ts
  398. FILE:=ngx-ts-module-$(PKG_VERSION)-$$(VERSION).tar.gz
  399. URL:=https://github.com/arut/nginx-ts-module.git
  400. MIRROR_HASH:=31ecc9968b928886b54884138eafe2fa747648bca5094d4c3132e8ae9509d1d3
  401. PROTO:=git
  402. endef
  403. $(eval $(call Download,nginx-ts))
  404. define Prepare/nginx-ts
  405. $(eval $(call Download,nginx-ts))
  406. gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  407. endef
  408. endif
  409. ifeq ($(CONFIG_NGINX_NAXSI),y)
  410. define Download/nginx-naxsi
  411. VERSION:=951123ad456bdf5ac94e8d8819342fe3d49bc002
  412. SUBDIR:=nginx-naxsi
  413. FILE:=nginx-naxsi-module-$(PKG_VERSION)-$$(VERSION).tar.gz
  414. URL:=https://github.com/nbs-system/naxsi.git
  415. MIRROR_HASH:=7ab791f2ff38096f48013141bbfe20ba213d5e04dcac08ca82e0cac07d5c30f0
  416. PROTO:=git
  417. endef
  418. $(eval $(call Download,nginx-naxsi))
  419. define Prepare/nginx-naxsi
  420. $(eval $(Download/nginx-naxsi))
  421. gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  422. endef
  423. endif
  424. ifeq ($(CONFIG_NGINX_LUA),y)
  425. define Download/lua-nginx
  426. VERSION:=576a10d246daf81c0ce1b959c50ee807769c01a8
  427. SUBDIR:=lua-nginx
  428. FILE:=lua-nginx-module-$(PKG_VERSION)-$$(VERSION).tar.gz
  429. URL:=https://github.com/openresty/lua-nginx-module.git
  430. MIRROR_HASH:=85ab2fc752d4e09f266209fdec507b30c57bb966c34bbff148cf3459ae5cac80
  431. PROTO:=git
  432. endef
  433. $(eval $(call Download,lua-nginx))
  434. define Prepare/lua-nginx
  435. $(eval $(Download/lua-nginx))
  436. gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  437. $(call PatchDir,$(PKG_BUILD_DIR),./patches-lua-nginx)
  438. endef
  439. endif
  440. $(eval $(call BuildPackage,nginx))
  441. $(eval $(call BuildPackage,nginx-ssl))
  442. $(eval $(call BuildPackage,nginx-all-module))
  443. $(eval $(call BuildPackage,nginx-mod-luci))
  444. $(eval $(call BuildPackage,nginx-mod-luci-ssl))