2 # Copyright (C) 2012-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=nginx-
$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://nginx.org
/download
/
16 PKG_HASH
:=2fe2294f8af4144e7e842eaea884182a84ee7970e11046ba98194400902bbec0
18 PKG_MAINTAINER
:=Thomas Heil
<heil@terminal-consulting.de
> \
19 Christian Marangi
<ansuelsmth@gmail.com
>
20 PKG_LICENSE
:=2-clause BSD-like license
21 PKG_CPE_ID
:=cpe
:/a
:nginx
:nginx
26 PKG_BUILD_FLAGS
:=gc-sections lto
41 # official and 3rd-party modules
45 PKG_MOD_PATCHED
:= $(shell find patches
-mindepth
1 -maxdepth
1 -type d
-name
'nginx-mod-*' | sed
-E
's,^patches/nginx-mod-,,')
47 PKG_CONFIG_DEPENDS
:= \
50 CONFIG_NGINX_STUB_STATUS \
51 CONFIG_NGINX_HTTP_CHARSET \
52 CONFIG_NGINX_HTTP_GZIP \
53 CONFIG_NGINX_HTTP_GZIP_STATIC \
54 CONFIG_NGINX_HTTP_SSI \
55 CONFIG_NGINX_HTTP_USERID \
56 CONFIG_NGINX_HTTP_ACCESS \
57 CONFIG_NGINX_HTTP_AUTH_BASIC \
58 CONFIG_NGINX_HTTP_AUTH_REQUEST \
59 CONFIG_NGINX_HTTP_AUTOINDEX \
60 CONFIG_NGINX_HTTP_GEO \
61 CONFIG_NGINX_HTTP_MAP \
62 CONFIG_NGINX_HTTP_SPLIT_CLIENTS \
63 CONFIG_NGINX_HTTP_REFERER \
64 CONFIG_NGINX_HTTP_REWRITE \
65 CONFIG_NGINX_HTTP_PROXY \
66 CONFIG_NGINX_HTTP_FASTCGI \
67 CONFIG_NGINX_HTTP_UWSGI \
68 CONFIG_NGINX_HTTP_SCGI \
69 CONFIG_NGINX_HTTP_MEMCACHED \
70 CONFIG_NGINX_HTTP_LIMIT_CONN \
71 CONFIG_NGINX_HTTP_LIMIT_REQ \
72 CONFIG_NGINX_HTTP_EMPTY_GIF \
73 CONFIG_NGINX_HTTP_BROWSER \
74 CONFIG_NGINX_HTTP_UPSTREAM_HASH \
75 CONFIG_NGINX_HTTP_UPSTREAM_IP_HASH \
76 CONFIG_NGINX_HTTP_UPSTREAM_LEAST_CONN \
77 CONFIG_NGINX_HTTP_UPSTREAM_KEEPALIVE \
78 CONFIG_NGINX_HTTP_UPSTREAM_ZONE \
79 CONFIG_NGINX_HTTP_CACHE \
80 CONFIG_NGINX_HTTP_V2 \
81 CONFIG_NGINX_HTTP_QUIC \
83 CONFIG_NGINX_HTTP_REAL_IP \
84 CONFIG_NGINX_HTTP_SECURE_LINK \
85 CONFIG_NGINX_STREAM_REAL_IP \
86 CONFIG_OPENSSL_ENGINE \
87 CONFIG_OPENSSL_WITH_NPN \
88 $(foreach m
,$(PKG_MOD_EXTRA
),CONFIG_PACKAGE_
$(m
))
90 include $(INCLUDE_DIR
)/package.mk
91 include $(INCLUDE_DIR
)/nls.mk
93 define Package
/nginx
/default
96 SUBMENU
:=Web Servers
/Proxies
97 TITLE
:=Nginx web server
98 URL
:=http
://nginx.org
/
99 DEPENDS
:=+libopenssl
+libpthread
100 # TODO: add PROVIDES when removing nginx
104 define Package
/nginx
/description
105 nginx is an HTTP and reverse proxy server
, as well
as a mail proxy server
, \
106 written by Igor Sysoev.
109 define Package
/nginx
/conffiles
113 define Package
/nginx-ssl
114 $(Package
/nginx
/default
)
115 TITLE
+= with SSL support
117 DEPENDS
+= +NGINX_PCRE
:libpcre2 \
118 +NGINX_PCRE
:nginx-ssl-util
+!NGINX_PCRE
:nginx-ssl-util-nopcre \
119 +NGINX_HTTP_GZIP
:zlib
+NGINX_DAV
:libxml2
120 EXTRA_DEPENDS
:=nginx-ssl-util
$(if
$(CONFIG_NGINX_PCRE
),,-nopcre
) (>=1.5-1) (<2)
121 CONFLICTS
:=nginx-full
124 Package
/nginx-ssl
/description
= $(Package
/nginx
/description
) \
125 This variant is compiled with SSL support enabled. To enable additional module \
126 select them in the nginx default configuration menu.
128 define Package
/nginx-ssl
/config
129 source
"$(SOURCE)/Config_ssl.in"
132 Package
/nginx-ssl
/conffiles
= $(Package
/nginx
/conffiles
)
134 IsEnabled
= $(or
$(filter full
,$(BUILD_VARIANT
)),$(CONFIG_
$(1)))
135 IsDisabled
= $(if
$(call IsEnabled
,$(1)),,1)
137 config_files
:= mime.types \
138 $(if
$(call IsEnabled
,NGINX_HTTP_CHARSET
),koi-utf koi-win win-utf
) \
139 $(if
$(call IsEnabled
,NGINX_HTTP_FASTCGI
),fastcgi_params
) \
140 $(if
$(call IsEnabled
,NGINX_HTTP_UWSGI
),uwsgi_params
) \
141 $(if
$(call IsEnabled
,NGINX_HTTP_SCGI
),scgi_params
)
143 define Package
/nginx-ssl
/install
144 $(INSTALL_DIR
) $(1)/usr
/sbin
145 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/nginx
$(1)/usr
/sbin
/
146 $(INSTALL_DIR
) $(1)/etc
/nginx
/module.d
147 $(INSTALL_DIR
) $(1)/etc
/nginx
/conf.d
148 $(INSTALL_DATA
) $(addprefix $(PKG_INSTALL_DIR
)/etc
/nginx
/,$(config_files
)) $(1)/etc
/nginx
/
149 $(INSTALL_DIR
) $(1)/etc
/init.d
150 $(INSTALL_BIN
) .
/files
/nginx.init
$(1)/etc
/init.d
/nginx
153 define Package
/nginx-ssl
/prerm
155 [ -z
"$${IPKG_INSTROOT}" ] || exit
0
156 [ "$${PKG_UPGRADE}" = "1" ] && exit
0
157 eval
$$(/usr
/bin
/nginx-util get_env
)
158 [ "$$(uci get "nginx.
$${LAN_NAME}.
$${MANAGE_SSL}")" = "self-signed" ] || exit
0
159 rm -f
"$$(uci get "nginx.
$${LAN_NAME}.ssl_certificate
")"
160 rm -f
"$$(uci get "nginx.
$${LAN_NAME}.ssl_certificate_key
")"
164 define Package
/nginx-full
165 $(Package
/nginx
/default
)
166 TITLE
+= with ALL config selected
167 DEPENDS
+=+libpcre2
+nginx-ssl-util
+zlib
+libxml2
168 EXTRA_DEPENDS
:=nginx-ssl-util
(>=1.5-1) (<2)
170 PROVIDES
+= nginx-ssl
173 Package
/nginx-full
/description
= $(Package
/nginx
/description
) \
174 This variant is compiled with ALL config selected.
176 Package
/nginx-full
/install = $(Package
/nginx-ssl
/install)
178 Package
/nginx-full
/prerm
= $(Package
/nginx-ssl
/prerm
)
180 Package
/nginx-full
/conffiles
= $(Package
/nginx
/conffiles
)
182 define Package
/nginx-mod-luci
186 SUBMENU
:=Web Servers
/Proxies
187 TITLE
:=Support file for Nginx
188 URL
:=http
://nginx.org
/
189 DEPENDS
:=+uwsgi
+uwsgi-luci-support
+nginx-ssl
+nginx-mod-ubus
190 # TODO: add PROVIDES when removing nginx-mod-luci-ssl
191 # PROVIDES:=nginx-mod-luci-ssl
194 define Package
/nginx-mod-luci
/description
195 Support file for LuCI in nginx. Include custom nginx configuration
, autostart script for uwsgi.
198 define Package
/nginx-mod-luci
/preinst
200 grep
-r
-l ngx_http_ubus_module.so
/etc
/nginx
/module.d | grep
-v ngx_http_ubus.module | while read file
; do
201 echo
"Removing old LuCI module load file for 'ngx_http_ubus.so' in $$file."
207 define Package
/nginx-mod-luci
/install
208 $(INSTALL_DIR
) $(1)/etc
/nginx
/conf.d
209 $(INSTALL_CONF
) .
/files-luci-support
/luci.locations
$(1)/etc
/nginx
/conf.d
/
210 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
211 $(INSTALL_BIN
) .
/files-luci-support
/60_nginx-luci-support
$(1)/etc
/uci-defaults
/60_nginx-luci-support
214 define Download
/nginx-mod-geoip2
215 SOURCE_DATE
:=2020-01-22
216 VERSION
:=1cabd8a1f68ea3998f94e9f3504431970f848fbf
217 URL
:=https
://github.com
/leev
/ngx_http_geoip2_module.git
218 MIRROR_HASH
:=f3d2a1af5c34812b5a34453457ba6a4d8093c92085aa7f76c46a1c4185c9735c
222 define Package
/nginx-mod-lua-resty-lrucache
223 $(call Package
/nginx
/default
)
224 DEPENDS
:=@HAS_LUAJIT_ARCH
+luajit2
225 TITLE
:=Nginx Lua OpenResty lrucache module
228 define Package
/nginx-mod-lua-resty-core
229 $(call Package
/nginx
/default
)
230 DEPENDS
:=+nginx-mod-lua-resty-lrucache
231 TITLE
:=Nginx Lua OpenResty core module
234 define Package
/nginx-mod-lua-resty-lrucache
/install
235 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/resty
/lrucache
236 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/nginx-mod-lua-resty-lrucache
/lib
/resty
/*.lua
$(1)/usr
/lib
/lua
/resty
237 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/nginx-mod-lua-resty-lrucache
/lib
/resty
/lrucache
/*.lua
$(1)/usr
/lib
/lua
/resty
/lrucache
240 define Package
/nginx-mod-lua-resty-core
/install
241 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/ngx
/ssl
242 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/resty
/core
243 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/nginx-mod-lua-resty-core
/lib
/ngx
/*.lua
$(1)/usr
/lib
/lua
/ngx
244 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/nginx-mod-lua-resty-core
/lib
/ngx
/ssl
/*.lua
$(1)/usr
/lib
/lua
/ngx
/ssl
245 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/nginx-mod-lua-resty-core
/lib
/resty
/*.lua
$(1)/usr
/lib
/lua
/resty
246 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/nginx-mod-lua-resty-core
/lib
/resty
/core
/*.lua
$(1)/usr
/lib
/lua
/resty
/core
249 define Download
/nginx-mod-headers-more
250 SOURCE_DATE
:=2022-07-17
251 VERSION
:=bea1be3bbf6af28f6aa8cf0c01c07ee1637e2bd0
252 URL
:=https
://github.com
/openresty
/headers-more-nginx-module.git
253 MIRROR_HASH
:=569abadc137b5b52bdcc33b00aa21f6d266cb84fb891795da2c4e101c4898abe
258 define Download
/nginx-mod-brotli
259 SOURCE_DATE
:=2020-04-23
260 VERSION
:=25f86f0bac1101b6512135eac5f93c49c63609e3
261 URL
:=https
://github.com
/google
/ngx_brotli.git
262 MIRROR_HASH
:=680c56be79e7327cb8df271646119333d2f6965a3472bc7043721625fa4488f5
266 define Download
/nginx-mod-rtmp
267 SOURCE_DATE
:=2018-12-07
268 VERSION
:=f0ea62342a4eca504b311cd5df910d026c3ea4cf
269 URL
:=https
://github.com
/ut0mt8
/nginx-rtmp-module.git
270 MIRROR_HASH
:=9c98d886ae4ea3708bb0bca55f8df803418a407e0ffc6df56341bd76ad39cba8
274 define Download
/nginx-mod-ts
275 SOURCE_DATE
:=2017-12-04
276 VERSION
:=ef2f874d95cc75747eb625a292524a702aefb0fd
277 URL
:=https
://github.com
/arut
/nginx-ts-module.git
278 MIRROR_HASH
:=3f144d4615a4aaa1215435cd06ae4054ea12206d5b38306321420f7acc62aca8
282 define Download
/nginx-mod-naxsi
283 SOURCE_DATE
:=2022-09-14
284 VERSION
:=d714f1636ea49a9a9f4f06dba14aee003e970834
285 URL
:=https
://github.com
/nbs-system
/naxsi.git
286 MIRROR_HASH
:=b0cef5fbf842f283eb5f0686ddd1afcd07d83abd7027c8cfb3e84a2223a34797
290 define Download
/nginx-mod-lua
291 SOURCE_DATE
:=2023-08-19
292 VERSION
:=c89469e920713d17d703a5f3736c9335edac22bf
293 URL
:=https
://github.com
/openresty
/lua-nginx-module.git
294 MIRROR_HASH
:=c3bdf1b23f0a63991b5dcbd1f8ee150e6f893b43278e8600e4e0bb42a6572db4
298 define Download
/nginx-mod-lua-resty-core
299 SOURCE_DATE
:=2023-09-09
300 VERSION
:=2e2b2adaa61719972fe4275fa4c3585daa0dcd84
301 URL
:=https
://github.com
/openresty
/lua-resty-core.git
302 MIRROR_HASH
:=c5f3df92fd72eac5b54497c039aca0f0d9ea1d87223f1e3a54365ba565991874
306 define Download
/nginx-mod-lua-resty-lrucache
307 SOURCE_DATE
:=2023-08-06
308 VERSION
:=52f5d00403c8b7aa8a4d4f3779681976b10a18c1
309 URL
:=https
://github.com
/openresty
/lua-resty-lrucache.git
310 MIRROR_HASH
:=0833e0114948af4edb216c5c34b3f1919f534b298f4fa29739544f7c9bb8a08d
314 define Download
/nginx-mod-dav-ext
315 SOURCE_DATE
:=2018-12-17
316 VERSION
:=f5e30888a256136d9c550bf1ada77d6ea78a48af
317 URL
:=https
://github.com
/arut
/nginx-dav-ext-module.git
318 MIRROR_HASH
:=c574e60ffab5f6e5d8bea18aab0799c19cd9a84f3d819b787e9af4f0e7867b52
322 define Download
/nginx-mod-ubus
323 SOURCE_DATE
:=2020-09-06
324 VERSION
:=b2d7260dcb428b2fb65540edb28d7538602b4a26
325 URL
:=https
://github.com
/Ansuel
/nginx-ubus-module.git
326 MIRROR_HASH
:=515bb9d355ad80916f594046a45c190a68fb6554d6795a54ca15cab8bdd12fda
330 define Module
/Download
331 define Download
/nginx-mod-
$(1) +=
333 SUBDIR
:=nginx-mod-
$(1)
334 FILE
:=nginx-mod-
$(1)-$$$$(subst -,.
,$$$$(SOURCE_DATE
))~
$$$$(call version_abbrev
,$$$$(VERSION
)).
tar.zst
337 $(foreach m
,$(PKG_MOD_EXTRA
),$(eval
$(call Module
/Download
,$(m
))))
339 define Module
/nginx-mod-naxsi
/install
340 $(INSTALL_DIR
) $(1)/etc
/nginx
341 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/nginx-mod-naxsi
/naxsi_config
/naxsi_core.rules
$(1)/etc
/nginx
344 define Quilt
/Refresh
/Package
345 $(call Quilt
/RefreshDir
,$(PKG_BUILD_DIR
),$(PATCH_DIR
)/nginx
,nginx
/)
346 $(foreach m
,$(PKG_MOD_PATCHED
),
347 $(call Quilt
/RefreshDir
,$(PKG_BUILD_DIR
),$(PATCH_DIR
)/nginx-mod-
$(m
),nginx-mod-
$(m
)/)
352 $(if
$(QUILT
),rm -rf
$(PKG_BUILD_DIR
)/patches
; mkdir
-p
$(PKG_BUILD_DIR
)/patches
)
353 $(call PatchDir
,$(PKG_BUILD_DIR
),$(PATCH_DIR
)/nginx
,nginx
/)
354 $(foreach m
,$(PKG_MOD_PATCHED
),$(if
$(or
$(CONFIG_PACKAGE_nginx-mod-
$(m
)),$(QUILT
)),
355 $(call PatchDir
,$(PKG_BUILD_DIR
),$(PATCH_DIR
)/nginx-mod-
$(m
),nginx-mod-
$(m
)/)
357 $(if
$(QUILT
),touch
$(PKG_BUILD_DIR
)/.quilt_used
)
360 define Module
/Build
/Prepare
361 $(eval
$(call Download
,nginx-mod-
$(1)))
362 $(eval
$(Download
/nginx-mod-
$(1)))
363 mkdir
-p
$(PKG_BUILD_DIR
)/nginx-mod-
$(1)
364 zstdcat
$(DL_DIR
)/$(FILE
) |
tar -C
$(PKG_BUILD_DIR
)/nginx-mod-
$(1) $(TAR_OPTIONS
) --strip-components
1
368 rm -rf
$(PKG_BUILD_DIR
)
369 mkdir
-p
$(PKG_BUILD_DIR
)
372 $(foreach m
,$(filter-out $(PKG_MOD_PATCHED
),$(PKG_MOD_EXTRA
)),$(if
$(CONFIG_PACKAGE_nginx-mod-
$(m
)),
373 $(call Module
/Build
/Prepare
,$(m
))
375 $(foreach m
,$(PKG_MOD_PATCHED
),$(if
$(or
$(CONFIG_PACKAGE_nginx-mod-
$(m
)),$(QUILT
)),
376 $(call Module
/Build
/Prepare
,$(m
))
382 # $(2) module additional dependency
383 # $(3) module so name (stripped of the finaly _module.so)
384 # $(4) module description
386 define Package
/nginx-mod-
$(1)
387 $(call Package
/nginx
/default
)
388 DEPENDS
:=+nginx-ssl
$(2)
389 TITLE
:=Nginx
$(1) module
392 define Package
/nginx-mod-
$(1)/description
396 define Package
/nginx-mod-
$(1)/install
397 $(INSTALL_DIR
) $$(1)/usr
/lib
/nginx
/modules
398 $(INSTALL_DIR
) $$(1)/etc
/nginx
/module.d
400 $(CP
) $$(PKG_INSTALL_DIR
)/usr
/lib
/nginx
/modules
/$(m
)_module.so
$$(1)/usr
/lib
/nginx
/modules
&& \
401 echo
"load_module /usr/lib/nginx/modules/$(m)_module.so;" > $$(1)/etc
/nginx
/module.d
/$(m
).module
403 $(call Module
/nginx-mod-
$(1)/install,$$(1))
406 $$(eval
$$(call BuildPackage
,nginx-mod-
$(1)))
409 TARGET_CFLAGS
+= -DNGX_LUA_NO_BY_LUA_BLOCK
411 ifneq ($(CONFIG_PACKAGE_nginx-mod-lua
),)
412 CONFIGURE_VARS
+= LUAJIT_INC
=$(STAGING_DIR
)/usr
/include/luajit-
* \
413 LUAJIT_LIB
=$(STAGING_DIR
)/usr
/lib
416 CONFIGURE_VARS
+= CONFIG_BIG_ENDIAN
=$(CONFIG_BIG_ENDIAN
)
419 --crossbuild
=Linux
::$(ARCH
) \
421 --conf-path
=/etc
/nginx
/nginx.conf \
422 --modules-path
=/usr
/lib
/nginx
/modules \
423 --error-log-path
=stderr \
424 --pid-path
=/var
/run
/nginx.pid \
425 --lock-path
=/var
/lock
/nginx.lock \
426 --http-log-path
=/var
/log
/nginx
/access.log \
427 --http-client-body-temp-path
=/var
/lib
/nginx
/body \
428 --http-proxy-temp-path
=/var
/lib
/nginx
/proxy \
429 --http-fastcgi-temp-path
=/var
/lib
/nginx
/fastcgi \
430 --with-cc
="$(TARGET_CC)" \
431 --with-ld-opt
="$(TARGET_LDFLAGS)" \
432 --without-http_upstream_zone_module \
434 --with-http_ssl_module \
435 $(if
$(call IsDisabled
,NGINX_HTTP_CACHE
),--without-http-cache
) \
436 $(if
$(call IsDisabled
,NGINX_PCRE
),--without-pcre
) \
437 $(if
$(call IsDisabled
,NGINX_HTTP_CHARSET
),--without-http_charset_module
) \
438 $(if
$(call IsDisabled
,NGINX_HTTP_GZIP
),--without-http_gzip_module
) \
439 $(if
$(call IsDisabled
,NGINX_HTTP_SSI
),--without-http_ssi_module
) \
440 $(if
$(call IsDisabled
,NGINX_HTTP_USERID
),--without-http_userid_module
) \
441 $(if
$(call IsDisabled
,NGINX_HTTP_ACCESS
),--without-http_access_module
) \
442 $(if
$(call IsDisabled
,NGINX_HTTP_AUTH_BASIC
),--without-http_auth_basic_module
) \
443 $(if
$(call IsDisabled
,NGINX_HTTP_AUTOINDEX
),--without-http_autoindex_module
) \
444 $(if
$(call IsDisabled
,NGINX_HTTP_GEO
),--without-http_geo_module
) \
445 $(if
$(call IsDisabled
,NGINX_HTTP_MAP
),--without-http_map_module
) \
446 $(if
$(call IsDisabled
,NGINX_HTTP_SPLIT_CLIENTS
),--without-http_split_clients_module
) \
447 $(if
$(call IsDisabled
,NGINX_HTTP_REFERER
),--without-http_referer_module
) \
448 $(if
$(call IsDisabled
,NGINX_HTTP_REWRITE
),--without-http_rewrite_module
) \
449 $(if
$(call IsDisabled
,NGINX_HTTP_PROXY
),--without-http_proxy_module
) \
450 $(if
$(call IsDisabled
,NGINX_HTTP_FASTCGI
),--without-http_fastcgi_module
) \
451 $(if
$(call IsDisabled
,NGINX_HTTP_UWSGI
),--without-http_uwsgi_module
) \
452 $(if
$(call IsDisabled
,NGINX_HTTP_SCGI
),--without-http_scgi_module
) \
453 $(if
$(call IsDisabled
,NGINX_HTTP_MEMCACHED
),--without-http_memcached_module
) \
454 $(if
$(call IsDisabled
,NGINX_HTTP_LIMIT_CONN
),--without-http_limit_conn_module
) \
455 $(if
$(call IsDisabled
,NGINX_HTTP_LIMIT_REQ
),--without-http_limit_req_module
) \
456 $(if
$(call IsDisabled
,NGINX_HTTP_EMPTY_GIF
),--without-http_empty_gif_module
) \
457 $(if
$(call IsDisabled
,NGINX_HTTP_BROWSER
),--without-http_browser_module
) \
458 $(if
$(call IsDisabled
,NGINX_HTTP_UPSTREAM_HASH
),--without-http_upstream_hash_module
) \
459 $(if
$(call IsDisabled
,NGINX_HTTP_UPSTREAM_IP_HASH
),--without-http_upstream_ip_hash_module
) \
460 $(if
$(call IsDisabled
,NGINX_HTTP_UPSTREAM_LEAST_CONN
),--without-http_upstream_least_conn_module
) \
461 $(if
$(call IsDisabled
,NGINX_HTTP_UPSTREAM_KEEPALIVE
),--without-http_upstream_keepalive_module
) \
462 $(if
$(call IsEnabled
,IPV6
),--with-ipv6
) \
463 $(if
$(call IsEnabled
,NGINX_HTTP_GZIP_STATIC
),--with-http_gzip_static_module
) \
464 $(if
$(call IsEnabled
,NGINX_STUB_STATUS
),--with-http_stub_status_module
) \
465 $(if
$(call IsEnabled
,NGINX_FLV
),--with-http_flv_module
) \
466 $(if
$(call IsEnabled
,NGINX_DAV
),--with-http_dav_module
) \
467 $(if
$(call IsEnabled
,NGINX_HTTP_AUTH_REQUEST
),--with-http_auth_request_module
) \
468 $(if
$(call IsEnabled
,NGINX_HTTP_QUIC
),--with-http_v3_module
) \
469 $(if
$(call IsEnabled
,NGINX_HTTP_V2
),--with-http_v2_module
) \
470 $(if
$(call IsEnabled
,NGINX_HTTP_REAL_IP
),--with-http_realip_module
) \
471 $(if
$(call IsEnabled
,NGINX_HTTP_SECURE_LINK
),--with-http_secure_link_module
) \
472 $(if
$(call IsEnabled
,NGINX_HTTP_SUB
),--with-http_sub_module
) \
473 $(if
$(CONFIG_PACKAGE_nginx-mod-stream
),--with-stream
=dynamic
--with-stream_ssl_module
--with-stream_ssl_preread_module
) \
474 $(if
$(call IsEnabled
,NGINX_STREAM_REAL_IP
),--with-stream_realip_module
) \
475 $(if
$(CONFIG_PACKAGE_nginx-mod-naxsi
),--add-dynamic-module
=$(PKG_BUILD_DIR
)/nginx-mod-naxsi
/naxsi_src
) \
476 $(foreach m
,$(filter-out lua-resty-core lua-resty-lrucache naxsi
,$(PKG_MOD_EXTRA
)), \
477 $(if
$(CONFIG_PACKAGE_nginx-mod-
$(m
)),--add-dynamic-module
=$(PKG_BUILD_DIR
)/nginx-mod-
$(m
)))
479 $(eval
$(call BuildPackage
,nginx-ssl
))
480 $(eval
$(call BuildPackage
,nginx-full
))
481 $(eval
$(call BuildPackage
,nginx-mod-luci
))
482 $(eval
$(call BuildPackage
,nginx-mod-lua-resty-lrucache
))
483 $(eval
$(call BuildPackage
,nginx-mod-lua-resty-core
))
484 $(eval
$(call BuildModule
,stream
,+@NGINX_STREAM_CORE_MODULE
, \
485 ngx_stream
, Add support for NGINX request streaming.
))
486 $(eval
$(call BuildModule
,lua
,+nginx-mod-lua-resty-core
,ngx_http_lua
, \
487 Enable Lua module
(luajit2 based
, OpenResty patches
)))
488 $(eval
$(call BuildModule
,ubus
,+libubus
+libjson-c
+libblobmsg-json
+@NGINX_UBUS
, \
489 ngx_http_ubus
,Enable UBUS api support directly from the server.
))
490 $(eval
$(call BuildModule
,dav-ext
,+@NGINX_DAV
+libxml2
,ngx_http_dav_ext
, \
491 Enable the WebDAV methods PROPFIND OPTIONS LOCK UNLOCK.
))
492 $(eval
$(call BuildModule
,headers-more
,,ngx_http_headers_more_filter
, \
493 Set and clear input and output headers...more than
"add"!))
494 $(eval
$(call BuildModule
,rtmp
,,ngx_rtmp
, \
495 Add support for NGINX-based Media Streaming Server module. DASH enhanced
))
496 $(eval
$(call BuildModule
,ts
,,ngx_http_ts
, \
497 Add support for MPEG-TS Live Module module.
))
498 $(eval
$(call BuildModule
,brotli
,,ngx_http_brotli_filter ngx_http_brotli_static
, \
499 Add support for brotli compression module.
))
500 $(eval
$(call BuildModule
,naxsi
,,ngx_http_naxsi
, \
501 Enable NAXSI module.
))
502 $(eval
$(call BuildModule
,geoip2
,+@NGINX_STREAM_CORE_MODULE
+nginx-mod-stream
+libmaxminddb
,ngx_http_geoip2 ngx_stream_geoip2
, \
503 Enable MaxMind GeoIP2 module.
))
505 # TODO: remove after a transition period (together with pkg nginx-util):
506 # It is for smoothly substituting nginx and nginx-mod-luci-ssl (by nginx-ssl
507 # respectively nginx-mod-luci). Add above commented PROVIDES when removing.
510 TITLE
:=Dummy package for transition when upgrading.
515 define Package
/nginx
/install
516 $(INSTALL_DIR
) $(1)/usr
/bin
519 $(eval
$(call BuildPackage
,nginx
))
521 define Package
/nginx-mod-luci-ssl
522 TITLE
:=Dummy package for transition when upgrading.
523 DEPENDS
:=+nginx-mod-luci
527 define Package
/nginx-mod-luci-ssl
/install
528 $(INSTALL_DIR
) $(1)/usr
/bin
531 $(eval
$(call BuildPackage
,nginx-mod-luci-ssl
))