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.

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