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.

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