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.

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