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.

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