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.

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