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.

503 lines
16 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.1
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://nginx.org/download/
  13. PKG_HASH:=c7206858d7f832b8ef73a45c9b8f8e436bcb1ee88db2bc85b8e438ecec9d5460
  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
  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
  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
  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_HEADERS_MORE),y)
  240. ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-headers-more
  241. endif
  242. ifeq ($(CONFIG_NGINX_HTTP_BROTLI),y)
  243. ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-brotli
  244. endif
  245. ifeq ($(CONFIG_NGINX_RTMP_MODULE),y)
  246. ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-rtmp
  247. endif
  248. ifeq ($(CONFIG_NGINX_TS_MODULE),y)
  249. ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-ts
  250. endif
  251. else
  252. CONFIG_NGINX_HEADERS_MORE:=y
  253. CONFIG_NGINX_HTTP_BROTLI:=y
  254. CONFIG_NGINX_RTMP_MODULE:=y
  255. CONFIG_NGINX_TS_MODULE:=y
  256. CONFIG_NGINX_NAXSI:=y
  257. CONFIG_NGINX_LUA:=y
  258. ADDITIONAL_MODULES += --with-http_ssl_module --add-module=$(PKG_BUILD_DIR)/nginx-naxsi/naxsi_src \
  259. --add-module=$(PKG_BUILD_DIR)/lua-nginx --with-ipv6 --with-http_stub_status_module --with-http_flv_module \
  260. --with-http_dav_module --with-http_auth_request_module --with-http_v2_module --with-http_realip_module \
  261. --with-http_secure_link_module --add-module=$(PKG_BUILD_DIR)/nginx-headers-more \
  262. --add-module=$(PKG_BUILD_DIR)/nginx-brotli --add-module=$(PKG_BUILD_DIR)/nginx-rtmp \
  263. --add-module=$(PKG_BUILD_DIR)/nginx-ts
  264. config_files += koi-utf koi-win win-utf fastcgi_params
  265. endif
  266. define Package/nginx-mod-luci/default
  267. TITLE:=Nginx on LuCI
  268. SECTION:=net
  269. CATEGORY:=Network
  270. SUBMENU:=Web Servers/Proxies
  271. TITLE:=Support file for Nginx
  272. URL:=http://nginx.org/
  273. DEPENDS:=+uwsgi-cgi +uwsgi-cgi-luci-support
  274. endef
  275. define Package/nginx-mod-luci
  276. $(Package/nginx-mod-luci/default)
  277. DEPENDS += +nginx
  278. endef
  279. define Package/nginx-mod-luci/description
  280. Support file for LuCI in nginx. Include custom nginx configuration, autostart script for uwsgi.
  281. endef
  282. define Package/nginx-mod-luci-ssl
  283. $(Package/nginx-mod-luci/default)
  284. TITLE += with HTTPS support
  285. DEPENDS += +nginx-ssl
  286. endef
  287. Package/nginx-mod-luci-ssl/description = $(define Package/nginx-mod-luci/description) \
  288. This also include redirect from http to https and cert autogeneration.
  289. TARGET_CFLAGS += -fvisibility=hidden -ffunction-sections -fdata-sections -DNGX_LUA_NO_BY_LUA_BLOCK
  290. TARGET_LDFLAGS += -Wl,--gc-sections
  291. ifeq ($(CONFIG_NGINX_LUA),y)
  292. CONFIGURE_VARS += LUA_INC=$(STAGING_DIR)/usr/include \
  293. LUA_LIB=$(STAGING_DIR)/usr/lib
  294. endif
  295. CONFIGURE_ARGS += \
  296. --crossbuild=Linux::$(ARCH) \
  297. --prefix=/usr \
  298. --conf-path=/etc/nginx/nginx.conf \
  299. $(ADDITIONAL_MODULES) \
  300. --error-log-path=/var/log/nginx/error.log \
  301. --pid-path=/var/run/nginx.pid \
  302. --lock-path=/var/lock/nginx.lock \
  303. --http-log-path=/var/log/nginx/access.log \
  304. --http-client-body-temp-path=/var/lib/nginx/body \
  305. --http-proxy-temp-path=/var/lib/nginx/proxy \
  306. --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
  307. --with-cc="$(TARGET_CC)" \
  308. --with-cc-opt="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
  309. --with-ld-opt="$(TARGET_LDFLAGS)" \
  310. --without-http_upstream_zone_module
  311. define Package/nginx-mod-luci/install
  312. $(INSTALL_DIR) $(1)/etc/nginx
  313. $(INSTALL_BIN) ./files-luci-support/luci_uwsgi.conf $(1)/etc/nginx/luci_uwsgi.conf
  314. $(INSTALL_BIN) ./files-luci-support/luci_nginx.conf $(1)/etc/nginx/luci_nginx.conf
  315. $(INSTALL_DIR) $(1)/etc/uci-defaults
  316. $(INSTALL_BIN) ./files-luci-support/60_nginx-luci-support $(1)/etc/uci-defaults/60_nginx-luci-support
  317. endef
  318. define Package/nginx-mod-luci-ssl/install
  319. $(Package/nginx-mod-luci/install)
  320. $(INSTALL_DIR) $(1)/etc/nginx
  321. $(INSTALL_BIN) ./files-luci-support/luci_nginx_ssl.conf $(1)/etc/nginx/luci_nginx_ssl.conf
  322. $(INSTALL_DIR) $(1)/etc/uci-defaults
  323. $(INSTALL_BIN) ./files-luci-support/70_nginx-luci-support-ssl $(1)/etc/uci-defaults/70_nginx-luci-support-ssl
  324. endef
  325. define Package/nginx/install
  326. $(INSTALL_DIR) $(1)/usr/sbin
  327. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nginx $(1)/usr/sbin/
  328. $(INSTALL_DIR) $(1)/etc/nginx
  329. $(INSTALL_DATA) $(addprefix $(PKG_INSTALL_DIR)/etc/nginx/,$(config_files)) $(1)/etc/nginx/
  330. $(INSTALL_DIR) $(1)/etc/init.d
  331. $(INSTALL_BIN) ./files/nginx.init $(1)/etc/init.d/nginx
  332. ifeq ($(CONFIG_NGINX_NAXSI),y)
  333. $(INSTALL_DIR) $(1)/etc/nginx
  334. $(INSTALL_BIN) $(PKG_BUILD_DIR)/nginx-naxsi/naxsi_config/naxsi_core.rules $(1)/etc/nginx
  335. chmod 0640 $(1)/etc/nginx/naxsi_core.rules
  336. endif
  337. $(if $(CONFIG_NGINX_NAXSI),$($(INSTALL_BIN) $(PKG_BUILD_DIR)/nginx-naxsi/naxsi_config/naxsi_core.rules $(1)/etc/nginx))
  338. $(if $(CONFIG_NGINX_NAXSI),$(chmod 0640 $(1)/etc/nginx/naxsi_core.rules))
  339. endef
  340. Package/nginx-ssl/install = $(Package/nginx/install)
  341. Package/nginx-all-module/install = $(Package/nginx/install)
  342. define Build/Prepare
  343. $(Build/Prepare/Default)
  344. $(Prepare/nginx-naxsi)
  345. $(Prepare/lua-nginx)
  346. $(Prepare/nginx-brotli)
  347. $(Prepare/nginx-headers-more)
  348. $(Prepare/nginx-rtmp)
  349. $(Prepare/nginx-ts)
  350. endef
  351. ifeq ($(CONFIG_NGINX_HEADERS_MORE),y)
  352. define Download/nginx-headers-more
  353. VERSION:=a9f7c7e86cc7441d04e2f11f01c2e3a9c4b0301d
  354. SUBDIR:=nginx-headers-more
  355. FILE:=headers-more-nginx-module-$(PKG_VERSION)-$$(VERSION).tar.gz
  356. URL:=https://github.com/openresty/headers-more-nginx-module.git
  357. MIRROR_HASH:=432609015719aaa7241e5166c7cda427acbe004f725887f78ef629d51bd9cb3f
  358. PROTO:=git
  359. endef
  360. $(eval $(call Download,nginx-headers-more))
  361. define Prepare/nginx-headers-more
  362. $(eval $(Download/nginx-headers-more))
  363. gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  364. endef
  365. endif
  366. ifeq ($(CONFIG_NGINX_HTTP_BROTLI),y)
  367. define Download/nginx-brotli
  368. VERSION:=e26248ee361c04e25f581b92b85d95681bdffb39
  369. SUBDIR:=nginx-brotli
  370. FILE:=ngx-brotli-module-$(PKG_VERSION)-$$(VERSION).tar.gz
  371. URL:=https://github.com/eustas/ngx_brotli.git
  372. MIRROR_HASH:=76b891ba49f82f0cfbc9cba875646e26ee986b522373e0aa2698a9923a4adcdb
  373. PROTO:=git
  374. endef
  375. $(eval $(call Download,nginx-brotli))
  376. define Prepare/nginx-brotli
  377. $(eval $(Download/nginx-brotli))
  378. gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  379. endef
  380. endif
  381. ifeq ($(CONFIG_NGINX_RTMP_MODULE),y)
  382. define Download/nginx-rtmp
  383. VERSION:=791b6136f02bc9613daf178723ac09f4df5a3bbf
  384. SUBDIR:=nginx-rtmp
  385. FILE:=ngx-rtmp-module-$(PKG_VERSION)-$$(VERSION).tar.gz
  386. URL:=https://github.com/arut/nginx-rtmp-module.git
  387. MIRROR_HASH:=8db3f7b545ce98f47415e0436e12dfb55ae787afd3cd9515b5642c7b9dc0ef00
  388. PROTO:=git
  389. endef
  390. $(eval $(call Download,nginx-rtmp))
  391. define Prepare/nginx-rtmp
  392. $(eval $(call Download,nginx-rtmp))
  393. gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  394. endef
  395. endif
  396. ifeq ($(CONFIG_NGINX_TS_MODULE),y)
  397. define Download/nginx-ts
  398. VERSION:=ef2f874d95cc75747eb625a292524a702aefb0fd
  399. SUBDIR:=nginx-ts
  400. FILE:=ngx-ts-module-$(PKG_VERSION)-$$(VERSION).tar.gz
  401. URL:=https://github.com/arut/nginx-ts-module.git
  402. MIRROR_HASH:=31ecc9968b928886b54884138eafe2fa747648bca5094d4c3132e8ae9509d1d3
  403. PROTO:=git
  404. endef
  405. $(eval $(call Download,nginx-ts))
  406. define Prepare/nginx-ts
  407. $(eval $(call Download,nginx-ts))
  408. gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  409. endef
  410. endif
  411. ifeq ($(CONFIG_NGINX_NAXSI),y)
  412. define Download/nginx-naxsi
  413. VERSION:=951123ad456bdf5ac94e8d8819342fe3d49bc002
  414. SUBDIR:=nginx-naxsi
  415. FILE:=nginx-naxsi-module-$(PKG_VERSION)-$$(VERSION).tar.gz
  416. URL:=https://github.com/nbs-system/naxsi.git
  417. MIRROR_HASH:=7ab791f2ff38096f48013141bbfe20ba213d5e04dcac08ca82e0cac07d5c30f0
  418. PROTO:=git
  419. endef
  420. $(eval $(call Download,nginx-naxsi))
  421. define Prepare/nginx-naxsi
  422. $(eval $(Download/nginx-naxsi))
  423. gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  424. endef
  425. endif
  426. ifeq ($(CONFIG_NGINX_LUA),y)
  427. define Download/lua-nginx
  428. VERSION:=576a10d246daf81c0ce1b959c50ee807769c01a8
  429. SUBDIR:=lua-nginx
  430. FILE:=lua-nginx-module-$(PKG_VERSION)-$$(VERSION).tar.gz
  431. URL:=https://github.com/openresty/lua-nginx-module.git
  432. MIRROR_HASH:=85ab2fc752d4e09f266209fdec507b30c57bb966c34bbff148cf3459ae5cac80
  433. PROTO:=git
  434. endef
  435. $(eval $(call Download,lua-nginx))
  436. define Prepare/lua-nginx
  437. $(eval $(Download/lua-nginx))
  438. gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  439. $(call PatchDir,$(PKG_BUILD_DIR),./patches-lua-nginx)
  440. endef
  441. endif
  442. $(eval $(call BuildPackage,nginx))
  443. $(eval $(call BuildPackage,nginx-ssl))
  444. $(eval $(call BuildPackage,nginx-all-module))
  445. $(eval $(call BuildPackage,nginx-mod-luci))
  446. $(eval $(call BuildPackage,nginx-mod-luci-ssl))