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.

542 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.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://nginx.org/download/
  13. PKG_HASH:=4fd376bad78797e7f18094a00f0f1088259326436b537eb5af69b01be2ca1345
  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. 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:libexpat
  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 +libexpat
  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. endif
  176. ifneq ($(CONFIG_NGINX_HTTP_SCGI),y)
  177. ADDITIONAL_MODULES += --without-http_scgi_module
  178. endif
  179. ifneq ($(CONFIG_NGINX_HTTP_MEMCACHED),y)
  180. ADDITIONAL_MODULES += --without-http_memcached_module
  181. endif
  182. ifneq ($(CONFIG_NGINX_HTTP_LIMIT_CONN),y)
  183. ADDITIONAL_MODULES += --without-http_limit_conn_module
  184. endif
  185. ifneq ($(CONFIG_NGINX_HTTP_LIMIT_REQ),y)
  186. ADDITIONAL_MODULES += --without-http_limit_req_module
  187. endif
  188. ifneq ($(CONFIG_NGINX_HTTP_EMPTY_GIF),y)
  189. ADDITIONAL_MODULES += --without-http_empty_gif_module
  190. endif
  191. ifneq ($(CONFIG_NGINX_HTTP_BROWSER),y)
  192. ADDITIONAL_MODULES += --without-http_browser_module
  193. endif
  194. ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_HASH),y)
  195. ADDITIONAL_MODULES += --without-http_upstream_hash_module
  196. endif
  197. ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_IP_HASH),y)
  198. ADDITIONAL_MODULES += --without-http_upstream_ip_hash_module
  199. endif
  200. ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_LEAST_CONN),y)
  201. ADDITIONAL_MODULES += --without-http_upstream_least_conn_module
  202. endif
  203. ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_KEEPALIVE),y)
  204. ADDITIONAL_MODULES += --without-http_upstream_keepalive_module
  205. endif
  206. ifeq ($(BUILD_VARIANT),ssl)
  207. ifneq ($(CONFIG_NGINX_SSL),y)
  208. ADDITIONAL_MODULES += --with-http_ssl_module
  209. endif
  210. endif
  211. ifeq ($(CONFIG_NGINX_SSL),y)
  212. ADDITIONAL_MODULES += --with-http_ssl_module
  213. endif
  214. ifeq ($(CONFIG_NGINX_NAXSI),y)
  215. ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-naxsi/naxsi_src
  216. endif
  217. ifeq ($(CONFIG_NGINX_LUA),y)
  218. ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/lua-nginx
  219. endif
  220. ifeq ($(CONFIG_IPV6),y)
  221. ADDITIONAL_MODULES += --with-ipv6
  222. endif
  223. ifeq ($(CONFIG_NGINX_STUB_STATUS),y)
  224. ADDITIONAL_MODULES += --with-http_stub_status_module
  225. endif
  226. ifeq ($(CONFIG_NGINX_FLV),y)
  227. ADDITIONAL_MODULES += --with-http_flv_module
  228. endif
  229. ifeq ($(CONFIG_NGINX_DAV),y)
  230. ADDITIONAL_MODULES += --with-http_dav_module --add-module=$(PKG_BUILD_DIR)/nginx-dav-ext-module
  231. endif
  232. ifeq ($(CONFIG_NGINX_HTTP_AUTH_REQUEST),y)
  233. ADDITIONAL_MODULES += --with-http_auth_request_module
  234. endif
  235. ifeq ($(CONFIG_NGINX_HTTP_V2),y)
  236. ADDITIONAL_MODULES += --with-http_v2_module
  237. endif
  238. ifeq ($(CONFIG_NGINX_HTTP_REAL_IP),y)
  239. ADDITIONAL_MODULES += --with-http_realip_module
  240. endif
  241. ifeq ($(CONFIG_NGINX_HTTP_SECURE_LINK),y)
  242. ADDITIONAL_MODULES += --with-http_secure_link_module
  243. endif
  244. ifeq ($(CONFIG_NGINX_HTTP_SUB),y)
  245. ADDITIONAL_MODULES += --with-http_sub_module
  246. endif
  247. ifeq ($(CONFIG_NGINX_STREAM_CORE_MODULE),y)
  248. ADDITIONAL_MODULES += --with-stream
  249. endif
  250. ifeq ($(CONFIG_NGINX_STREAM_SSL_MODULE),y)
  251. ADDITIONAL_MODULES += --with-stream_ssl_module
  252. endif
  253. ifeq ($(CONFIG_NGINX_STREAM_SSL_PREREAD_MODULE),y)
  254. ADDITIONAL_MODULES += --with-stream_ssl_preread_module
  255. endif
  256. ifeq ($(CONFIG_NGINX_HEADERS_MORE),y)
  257. ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-headers-more
  258. endif
  259. ifeq ($(CONFIG_NGINX_HTTP_BROTLI),y)
  260. ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-brotli
  261. endif
  262. ifeq ($(CONFIG_NGINX_RTMP_MODULE),y)
  263. ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-rtmp
  264. endif
  265. ifeq ($(CONFIG_NGINX_TS_MODULE),y)
  266. ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-ts
  267. endif
  268. else
  269. CONFIG_NGINX_HEADERS_MORE:=y
  270. CONFIG_NGINX_HTTP_BROTLI:=y
  271. CONFIG_NGINX_RTMP_MODULE:=y
  272. CONFIG_NGINX_TS_MODULE:=y
  273. CONFIG_NGINX_NAXSI:=y
  274. CONFIG_NGINX_LUA:=y
  275. CONFIG_NGINX_DAV:=y
  276. ADDITIONAL_MODULES += --with-http_ssl_module --add-module=$(PKG_BUILD_DIR)/nginx-naxsi/naxsi_src \
  277. --add-module=$(PKG_BUILD_DIR)/lua-nginx --with-ipv6 --with-http_stub_status_module --with-http_flv_module \
  278. --with-http_dav_module --add-module=$(PKG_BUILD_DIR)/nginx-dav-ext-module \
  279. --with-http_auth_request_module --with-http_v2_module --with-http_realip_module \
  280. --with-http_secure_link_module --with-http_sub_module --add-module=$(PKG_BUILD_DIR)/nginx-headers-more \
  281. --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module \
  282. --add-module=$(PKG_BUILD_DIR)/nginx-brotli --add-module=$(PKG_BUILD_DIR)/nginx-rtmp \
  283. --add-module=$(PKG_BUILD_DIR)/nginx-ts
  284. config_files += koi-utf koi-win win-utf fastcgi_params
  285. endif
  286. define Package/nginx-mod-luci/default
  287. TITLE:=Nginx on LuCI
  288. SECTION:=net
  289. CATEGORY:=Network
  290. SUBMENU:=Web Servers/Proxies
  291. TITLE:=Support file for Nginx
  292. URL:=http://nginx.org/
  293. DEPENDS:=+uwsgi-cgi +uwsgi-cgi-luci-support
  294. endef
  295. define Package/nginx-mod-luci
  296. $(Package/nginx-mod-luci/default)
  297. DEPENDS += +nginx
  298. endef
  299. define Package/nginx-mod-luci/description
  300. Support file for LuCI in nginx. Include custom nginx configuration, autostart script for uwsgi.
  301. endef
  302. define Package/nginx-mod-luci-ssl
  303. $(Package/nginx-mod-luci/default)
  304. TITLE += with HTTPS support
  305. DEPENDS += +nginx-ssl
  306. endef
  307. Package/nginx-mod-luci-ssl/description = $(define Package/nginx-mod-luci/description) \
  308. This also include redirect from http to https and cert autogeneration.
  309. TARGET_CFLAGS += -fvisibility=hidden -ffunction-sections -fdata-sections -DNGX_LUA_NO_BY_LUA_BLOCK
  310. TARGET_LDFLAGS += -Wl,--gc-sections
  311. ifeq ($(CONFIG_NGINX_LUA),y)
  312. CONFIGURE_VARS += LUA_INC=$(STAGING_DIR)/usr/include \
  313. LUA_LIB=$(STAGING_DIR)/usr/lib
  314. endif
  315. CONFIGURE_ARGS += \
  316. --crossbuild=Linux::$(ARCH) \
  317. --prefix=/usr \
  318. --conf-path=/etc/nginx/nginx.conf \
  319. $(ADDITIONAL_MODULES) \
  320. --error-log-path=/var/log/nginx/error.log \
  321. --pid-path=/var/run/nginx.pid \
  322. --lock-path=/var/lock/nginx.lock \
  323. --http-log-path=/var/log/nginx/access.log \
  324. --http-client-body-temp-path=/var/lib/nginx/body \
  325. --http-proxy-temp-path=/var/lib/nginx/proxy \
  326. --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
  327. --with-cc="$(TARGET_CC)" \
  328. --with-cc-opt="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
  329. --with-ld-opt="$(TARGET_LDFLAGS)" \
  330. --without-http_upstream_zone_module
  331. define Package/nginx-mod-luci/install
  332. $(INSTALL_DIR) $(1)/etc/nginx
  333. $(INSTALL_BIN) ./files-luci-support/luci_uwsgi.conf $(1)/etc/nginx/luci_uwsgi.conf
  334. $(INSTALL_BIN) ./files-luci-support/luci_nginx.conf $(1)/etc/nginx/luci_nginx.conf
  335. $(INSTALL_DIR) $(1)/etc/uci-defaults
  336. $(INSTALL_BIN) ./files-luci-support/60_nginx-luci-support $(1)/etc/uci-defaults/60_nginx-luci-support
  337. endef
  338. define Package/nginx-mod-luci-ssl/install
  339. $(Package/nginx-mod-luci/install)
  340. $(INSTALL_DIR) $(1)/etc/nginx
  341. $(INSTALL_BIN) ./files-luci-support/luci_nginx_ssl.conf $(1)/etc/nginx/luci_nginx_ssl.conf
  342. $(INSTALL_DIR) $(1)/etc/uci-defaults
  343. $(INSTALL_BIN) ./files-luci-support/70_nginx-luci-support-ssl $(1)/etc/uci-defaults/70_nginx-luci-support-ssl
  344. endef
  345. define Package/nginx/install
  346. $(INSTALL_DIR) $(1)/usr/sbin
  347. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nginx $(1)/usr/sbin/
  348. $(INSTALL_DIR) $(1)/etc/nginx
  349. $(INSTALL_DATA) $(addprefix $(PKG_INSTALL_DIR)/etc/nginx/,$(config_files)) $(1)/etc/nginx/
  350. $(INSTALL_DIR) $(1)/etc/init.d
  351. $(INSTALL_BIN) ./files/nginx.init $(1)/etc/init.d/nginx
  352. ifeq ($(CONFIG_NGINX_NAXSI),y)
  353. $(INSTALL_DIR) $(1)/etc/nginx
  354. $(INSTALL_BIN) $(PKG_BUILD_DIR)/nginx-naxsi/naxsi_config/naxsi_core.rules $(1)/etc/nginx
  355. chmod 0640 $(1)/etc/nginx/naxsi_core.rules
  356. endif
  357. $(if $(CONFIG_NGINX_NAXSI),$($(INSTALL_BIN) $(PKG_BUILD_DIR)/nginx-naxsi/naxsi_config/naxsi_core.rules $(1)/etc/nginx))
  358. $(if $(CONFIG_NGINX_NAXSI),$(chmod 0640 $(1)/etc/nginx/naxsi_core.rules))
  359. endef
  360. Package/nginx-ssl/install = $(Package/nginx/install)
  361. Package/nginx-all-module/install = $(Package/nginx/install)
  362. define Build/Prepare
  363. $(Build/Prepare/Default)
  364. $(Prepare/nginx-naxsi)
  365. $(Prepare/lua-nginx)
  366. $(Prepare/nginx-brotli)
  367. $(Prepare/nginx-headers-more)
  368. $(Prepare/nginx-rtmp)
  369. $(Prepare/nginx-ts)
  370. $(Prepare/nginx-dav-ext-module)
  371. endef
  372. ifeq ($(CONFIG_NGINX_HEADERS_MORE),y)
  373. define Download/nginx-headers-more
  374. VERSION:=a9f7c7e86cc7441d04e2f11f01c2e3a9c4b0301d
  375. SUBDIR:=nginx-headers-more
  376. FILE:=headers-more-nginx-module-$$(VERSION).tar.gz
  377. URL:=https://github.com/openresty/headers-more-nginx-module.git
  378. MIRROR_HASH:=432609015719aaa7241e5166c7cda427acbe004f725887f78ef629d51bd9cb3f
  379. PROTO:=git
  380. endef
  381. $(eval $(call Download,nginx-headers-more))
  382. define Prepare/nginx-headers-more
  383. $(eval $(Download/nginx-headers-more))
  384. gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  385. endef
  386. endif
  387. ifeq ($(CONFIG_NGINX_HTTP_BROTLI),y)
  388. define Download/nginx-brotli
  389. VERSION:=e26248ee361c04e25f581b92b85d95681bdffb39
  390. SUBDIR:=nginx-brotli
  391. FILE:=ngx-brotli-module-$$(VERSION).tar.gz
  392. URL:=https://github.com/eustas/ngx_brotli.git
  393. MIRROR_HASH:=76b891ba49f82f0cfbc9cba875646e26ee986b522373e0aa2698a9923a4adcdb
  394. PROTO:=git
  395. endef
  396. $(eval $(call Download,nginx-brotli))
  397. define Prepare/nginx-brotli
  398. $(eval $(Download/nginx-brotli))
  399. gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  400. endef
  401. endif
  402. ifeq ($(CONFIG_NGINX_RTMP_MODULE),y)
  403. define Download/nginx-rtmp
  404. VERSION:=f0ea62342a4eca504b311cd5df910d026c3ea4cf
  405. SUBDIR:=nginx-rtmp
  406. FILE:=ngx-rtmp-module-$$(VERSION).tar.gz
  407. URL:=https://github.com/ut0mt8/nginx-rtmp-module.git
  408. MIRROR_HASH:=9ba7625718d21f658c4878729271832a07bd989165f1d1c720b3a9b54cf738cc
  409. PROTO:=git
  410. endef
  411. $(eval $(call Download,nginx-rtmp))
  412. define Prepare/nginx-rtmp
  413. $(eval $(Download/nginx-rtmp))
  414. gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  415. endef
  416. endif
  417. ifeq ($(CONFIG_NGINX_TS_MODULE),y)
  418. define Download/nginx-ts
  419. VERSION:=ef2f874d95cc75747eb625a292524a702aefb0fd
  420. SUBDIR:=nginx-ts
  421. FILE:=ngx-ts-module-$$(VERSION).tar.gz
  422. URL:=https://github.com/arut/nginx-ts-module.git
  423. MIRROR_HASH:=31ecc9968b928886b54884138eafe2fa747648bca5094d4c3132e8ae9509d1d3
  424. PROTO:=git
  425. endef
  426. $(eval $(call Download,nginx-ts))
  427. define Prepare/nginx-ts
  428. $(eval $(Download/nginx-ts))
  429. gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  430. endef
  431. endif
  432. ifeq ($(CONFIG_NGINX_NAXSI),y)
  433. define Download/nginx-naxsi
  434. VERSION:=951123ad456bdf5ac94e8d8819342fe3d49bc002
  435. SUBDIR:=nginx-naxsi
  436. FILE:=nginx-naxsi-module-$$(VERSION).tar.gz
  437. URL:=https://github.com/nbs-system/naxsi.git
  438. MIRROR_HASH:=7ab791f2ff38096f48013141bbfe20ba213d5e04dcac08ca82e0cac07d5c30f0
  439. PROTO:=git
  440. endef
  441. $(eval $(call Download,nginx-naxsi))
  442. define Prepare/nginx-naxsi
  443. $(eval $(Download/nginx-naxsi))
  444. gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  445. endef
  446. endif
  447. ifeq ($(CONFIG_NGINX_LUA),y)
  448. define Download/lua-nginx
  449. VERSION:=e94f2e5d64daa45ff396e262d8dab8e56f5f10e0
  450. SUBDIR:=lua-nginx
  451. FILE:=lua-nginx-module-$$(VERSION).tar.gz
  452. URL:=https://github.com/openresty/lua-nginx-module.git
  453. MIRROR_HASH:=ae439f9a8b3c34d7240735b844db72ee721af4791bbaff5692bca20e6785f541
  454. PROTO:=git
  455. endef
  456. $(eval $(call Download,lua-nginx))
  457. define Prepare/lua-nginx
  458. $(eval $(Download/lua-nginx))
  459. gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  460. $(call PatchDir,$(PKG_BUILD_DIR),./patches-lua-nginx)
  461. endef
  462. endif
  463. ifeq ($(CONFIG_NGINX_DAV),y)
  464. define Download/nginx-dav-ext-module
  465. VERSION:=430fd774fe838a04f1a5defbf1dd571d42300cf9
  466. SUBDIR:=nginx-dav-ext-module
  467. FILE:=nginx-dav-ext-module-$$(VERSION).tar.gz
  468. URL:=https://github.com/arut/nginx-dav-ext-module.git
  469. MIRROR_HASH:=0566053a8756423ecab455fd9d218cec1e017598fcbb3d6415a06f816851611e
  470. PROTO:=git
  471. endef
  472. $(eval $(call Download,nginx-dav-ext-module))
  473. define Prepare/nginx-dav-ext-module
  474. $(eval $(Download/nginx-dav-ext-module))
  475. gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  476. endef
  477. endif
  478. $(eval $(call BuildPackage,nginx))
  479. $(eval $(call BuildPackage,nginx-ssl))
  480. $(eval $(call BuildPackage,nginx-all-module))
  481. $(eval $(call BuildPackage,nginx-mod-luci))
  482. $(eval $(call BuildPackage,nginx-mod-luci-ssl))