mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
nginx: upstep to 1.10.0, add Lua module, footprint optimizations
Signed-off-by: Dirk Feytons <dirk.feytons@gmail.com>
This commit is contained in:
+34
-8
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2012-2015 OpenWrt.org
|
||||
# Copyright (C) 2012-2016 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nginx
|
||||
PKG_VERSION:=1.9.13
|
||||
PKG_VERSION:=1.10.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://nginx.org/download/
|
||||
PKG_MD5SUM:=e7502dc170277597ca73eb53c359c771
|
||||
PKG_MD5SUM:=c184c873d2798c5ba92be95ed1209c02
|
||||
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
|
||||
PKG_LICENSE:=2-clause BSD-like license
|
||||
|
||||
@@ -54,7 +54,9 @@ PKG_CONFIG_DEPENDS := \
|
||||
CONFIG_NGINX_HTTP_UPSTREAM_KEEPALIVE \
|
||||
CONFIG_NGINX_HTTP_UPSTREAM_ZONE \
|
||||
CONFIG_NGINX_HTTP_CACHE \
|
||||
CONFIG_NGINX_PCRE
|
||||
CONFIG_NGINX_PCRE \
|
||||
CONFIG_NGINX_NAXSI \
|
||||
CONFIG_NGINX_LUA
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -64,7 +66,7 @@ define Package/nginx
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=Nginx web server
|
||||
URL:=http://nginx.org/
|
||||
DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl +NGINX_HTTP_GZIP:zlib +libpthread
|
||||
DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl +NGINX_HTTP_GZIP:zlib +NGINX_LUA:liblua +libpthread
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
@@ -77,7 +79,7 @@ define Package/nginx/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
config_files=nginx.conf mime.types fastcgi_params koi-utf koi-win win-utf
|
||||
config_files=nginx.conf mime.types
|
||||
|
||||
define Package/nginx/conffiles
|
||||
/etc/nginx/
|
||||
@@ -87,8 +89,9 @@ ADDITIONAL_MODULES:=
|
||||
ifeq ($(CONFIG_NGINX_NAXSI),y)
|
||||
ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-naxsi/naxsi_src
|
||||
endif
|
||||
|
||||
ADDITIONAL_MODULES:=
|
||||
ifeq ($(CONFIG_NGINX_LUA),y)
|
||||
ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/lua-nginx
|
||||
endif
|
||||
ifeq ($(CONFIG_IPV6),y)
|
||||
ADDITIONAL_MODULES += --with-ipv6
|
||||
endif
|
||||
@@ -112,6 +115,8 @@ ifneq ($(CONFIG_NGINX_PCRE),y)
|
||||
endif
|
||||
ifneq ($(CONFIG_NGINX_HTTP_CHARSET),y)
|
||||
ADDITIONAL_MODULES += --without-http_charset_module
|
||||
else
|
||||
config_files += koi-utf koi-win win-utf
|
||||
endif
|
||||
ifneq ($(CONFIG_NGINX_HTTP_GZIP),y)
|
||||
ADDITIONAL_MODULES += --without-http_gzip_module
|
||||
@@ -151,6 +156,8 @@ ifneq ($(CONFIG_NGINX_HTTP_PROXY),y)
|
||||
endif
|
||||
ifneq ($(CONFIG_NGINX_HTTP_FASTCGI),y)
|
||||
ADDITIONAL_MODULES += --without-http_fastcgi_module
|
||||
else
|
||||
config_files += fastcgi_params
|
||||
endif
|
||||
ifneq ($(CONFIG_NGINX_HTTP_UWSGI),y)
|
||||
ADDITIONAL_MODULES += --without-http_uwsgi_module
|
||||
@@ -186,8 +193,12 @@ ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_KEEPALIVE),y)
|
||||
ADDITIONAL_MODULES += --without-http_upstream_keepalive_module
|
||||
endif
|
||||
|
||||
TARGET_CFLAGS += -fvisibility=hidden -ffunction-sections -fdata-sections -DNGX_LUA_NO_BY_LUA_BLOCK
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
define Build/Configure
|
||||
( cd $(PKG_BUILD_DIR) ; \
|
||||
$(if $(CONFIG_NGINX_LUA),LUA_INC=$(STAGING_DIR)/usr/include LUA_LIB=$(STAGING_DIR)/usr/lib) \
|
||||
./configure \
|
||||
--crossbuild=Linux::$(ARCH) \
|
||||
--prefix=/usr \
|
||||
@@ -226,6 +237,7 @@ endef
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
$(if $(CONFIG_NGINX_NAXSI),$(call Prepare/nginx-naxsi))
|
||||
$(if $(CONFIG_NGINX_LUA),$(call Prepare/lua-nginx))
|
||||
endef
|
||||
|
||||
define Download/nginx-naxsi
|
||||
@@ -241,4 +253,18 @@ define Prepare/nginx-naxsi
|
||||
gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
|
||||
endef
|
||||
|
||||
define Download/lua-nginx
|
||||
VERSION:=df5bf1d6242eb5c11adf0dccb8e830dc6672e14b
|
||||
SUBDIR:=lua-nginx
|
||||
FILE:=lua-nginx-module-$(PKG_VERSION)-$$(VERSION).tar.gz
|
||||
URL:=https://github.com/openresty/lua-nginx-module.git
|
||||
PROTO:=git
|
||||
endef
|
||||
|
||||
define Prepare/lua-nginx
|
||||
$(eval $(call Download,lua-nginx))
|
||||
gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
|
||||
$(call PatchDir,$(PKG_BUILD_DIR),./patches-lua-nginx)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,nginx))
|
||||
|
||||
Reference in New Issue
Block a user