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.

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