packages: nginx: clean up options

* Make all options enabling features (and default to y in case if
  they were previously disabling features).
* Add missing SSL dependencies to AUTH_BASIC and HTTP_CACHE, allowing
  them to be enabled/disabled independently.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@36379 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jogo
2013-04-22 15:09:19 +00:00
parent c0701c2619
commit 625016864d
2 changed files with 150 additions and 161 deletions

View File

@ -11,160 +11,150 @@ menu "Configuration"
config NGINX_STUB_STATUS config NGINX_STUB_STATUS
bool bool
prompt "Enable stub status module" prompt "Enable stub status module"
default n
help help
Enable the stub status module which gives some status from the server. Enable the stub status module which gives some status from the server.
config NGINX_FLV config NGINX_FLV
bool bool
prompt "Enable FLV module" prompt "Enable FLV module"
default n
help help
Provides the ability to seek within FLV (Flash) files using time-based offsets. Provides the ability to seek within FLV (Flash) files using time-based offsets.
config NGINX_SSL config NGINX_SSL
bool bool
prompt "Enable SSL module" prompt "Enable SSL module"
default n
help help
Enable HTTPS/SSL support. Enable HTTPS/SSL support.
config NGINX_DAV config NGINX_DAV
bool bool
prompt "Enable WebDAV module" prompt "Enable WebDAV module"
default n
help help
Enable the HTTP and WebDAV methods PUT, DELETE, MKCOL, COPY and MOVE. Enable the HTTP and WebDAV methods PUT, DELETE, MKCOL, COPY and MOVE.
config NGINX_MODULE_LUA config NGINX_LUA
bool bool
prompt "Enable LUA module" prompt "Enable LUA module"
default n
help help
Enable support for LUA scripts. Enable support for LUA scripts.
menu "Disable features" config NGINX_DISABLE_PCRE
config NGINX_DISABLE_PCRE
bool bool
prompt "Disable PCRE library usage" prompt "Enable PCRE library usage"
default n
config NGINX_DISABLE_HTTP_CACHE
depends on NGINX_SSL=y
bool
prompt "Disable HTTP cache"
default y default y
config NGINX_DISABLE_HTTP_CHARSET_MODULE config NGINX_HTTP_CACHE
bool bool
prompt "Disable HTTP charset module" prompt "Enable HTTP cache"
default n
config NGINX_DISABLE_HTTP_GZIP_MODULE config NGINX_HTTP_CHARSET
bool bool
prompt "Disable HTTP gzip module" prompt "Enable HTTP charset module"
default n default y
config NGINX_DISABLE_HTTP_SSI_MODULE config NGINX_HTTP_GZIP
bool bool
prompt "Disable HTTP ssi module" prompt "Enable HTTP gzip module"
default n default y
config NGINX_DISABLE_HTTP_USERID_MODULE config NGINX_HTTP_SSI
bool bool
prompt "Disable HTTP userid module" prompt "Enable HTTP ssi module"
default n default y
config NGINX_DISABLE_HTTP_ACCESS_MODULE config NGINX_HTTP_USERID
bool bool
prompt "Disable HTTP access module" prompt "Enable HTTP userid module"
default n default y
config NGINX_DISABLE_HTTP_AUTH_BASIC_MODULE config NGINX_HTTP_ACCESS
bool bool
prompt "Disable HTTP auth basic" prompt "Enable HTTP access module"
default n default y
config NGINX_DISABLE_HTTP_AUTOINDEX_MODULE config NGINX_HTTP_AUTH_BASIC
bool bool
prompt "Disable HTTP autoindex module" prompt "Enable HTTP auth basic"
default n default y
config NGINX_DISABLE_HTTP_GEO_MODULE config NGINX_HTTP_AUTOINDEX
bool bool
prompt "Disable HTTP geo module" prompt "Enable HTTP autoindex module"
default n default y
config NGINX_DISABLE_HTTP_MAP_MODULE config NGINX_HTTP_GEO
bool bool
prompt "Disable HTTP map module" prompt "Enable HTTP geo module"
default n default y
config NGINX_DISABLE_HTTP_SPLIT_CLIENTS_MODULE config NGINX_HTTP_MAP
bool bool
prompt "Disable HTTP split clients" prompt "Enable HTTP map module"
default n default y
config NGINX_DISABLE_HTTP_REFERER_MODULE config NGINX_HTTP_SPLIT_CLIENTS
bool bool
prompt "Disable HTTP referer module" prompt "Enable HTTP split clients"
default n default y
config NGINX_DISABLE_HTTP_REWRITE_MODULE config NGINX_HTTP_REFERER
bool bool
prompt "Disable HTTP rewrite module" prompt "Enable HTTP referer module"
default n default y
config NGINX_DISABLE_HTTP_PROXY_MODULE config NGINX_HTTP_REWRITE
bool bool
prompt "Disable HTTP proxy module" prompt "Enable HTTP rewrite module"
default n default y
config NGINX_DISABLE_HTTP_FASTCGI_MODULE config NGINX_HTTP_PROXY
bool bool
prompt "Disable HTTP fastcgi module" prompt "Enable HTTP proxy module"
default n default y
config NGINX_DISABLE_HTTP_UWSGI_MODULE config NGINX_HTTP_FASTCGI
bool bool
prompt "Disable HTTP uwsgi module" prompt "Enable HTTP fastcgi module"
default n default y
config NGINX_DISABLE_HTTP_SCGI_MODULE config NGINX_HTTP_UWSGI
bool bool
prompt "Disable HTTP scgi module" prompt "Enable HTTP uwsgi module"
default n default y
config NGINX_DISABLE_HTTP_MEMCACHED_MODULE config NGINX_HTTP_SCGI
bool bool
prompt "Disable HTTP memcached module" prompt "Enable HTTP scgi module"
default n default y
config NGINX_DISABLE_HTTP_LIMIT_CONN_MODULE config NGINX_HTTP_MEMCACHED
bool bool
prompt "Disable HTTP limit conn" prompt "Enable HTTP memcached module"
default n default y
config NGINX_DISABLE_HTTP_LIMIT_REQ_MODULE config NGINX_HTTP_LIMIT_CONN
bool bool
prompt "Disable HTTP limit req" prompt "Enable HTTP limit conn"
default n default y
config NGINX_DISABLE_HTTP_EMPTY_GIF_MODULE config NGINX_HTTP_LIMIT_REQ
bool bool
prompt "Disable HTTP empty gif" prompt "Enable HTTP limit req"
default n default y
config NGINX_DISABLE_HTTP_BROWSER_MODULE config NGINX_HTTP_EMPTY_GIF
bool bool
prompt "Disable HTTP browser module" prompt "Enable HTTP empty gif"
default n default y
config NGINX_DISABLE_HTTP_UPSTREAM_IP_HASH_MODULE config NGINX_HTTP_BROWSER
bool bool
prompt "Disable HTTP IP hash module" prompt "Enable HTTP browser module"
default n default y
config NGINX_HTTP_UPSTREAM_IP_HASH
bool
prompt "Enable HTTP IP hash module"
default y
endmenu
endmenu endmenu

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=nginx PKG_NAME:=nginx
PKG_VERSION:=1.2.6 PKG_VERSION:=1.2.6
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://nginx.org/download/ PKG_SOURCE_URL:=http://nginx.org/download/
@ -23,30 +23,31 @@ PKG_CONFIG_DEPENDS := \
CONFIG_NGINX_FLV \ CONFIG_NGINX_FLV \
CONFIG_NGINX_SSL \ CONFIG_NGINX_SSL \
CONFIG_NGINX_DAV \ CONFIG_NGINX_DAV \
CONFIG_NGINX_MODULE_LUA \ CONFIG_NGINX_LUA \
CONFIG_NGINX_DISABLE_PCRE \ CONFIG_NGINX_PCRE \
CONFIG_NGINX_DISABLE_HTTP_CHARSET_MODULE \ CONFIG_NGINX_HTTP_CACHE \
CONFIG_NGINX_DISABLE_HTTP_GZIP_MODULE \ CONFIG_NGINX_HTTP_CHARSET \
CONFIG_NGINX_DISABLE_HTTP_SSI_MODULE \ CONFIG_NGINX_HTTP_GZIP \
CONFIG_NGINX_DISABLE_HTTP_USERID_MODULE \ CONFIG_NGINX_HTTP_SSI \
CONFIG_NGINX_DISABLE_HTTP_ACCESS_MODULE \ CONFIG_NGINX_HTTP_USERID \
CONFIG_NGINX_DISABLE_HTTP_AUTH_BASIC_MODULE \ CONFIG_NGINX_HTTP_ACCESS \
CONFIG_NGINX_DISABLE_HTTP_AUTOINDEX_MODULE \ CONFIG_NGINX_HTTP_AUTH_BASIC \
CONFIG_NGINX_DISABLE_HTTP_GEO_MODULE \ CONFIG_NGINX_HTTP_AUTOINDEX \
CONFIG_NGINX_DISABLE_HTTP_MAP_MODULE \ CONFIG_NGINX_HTTP_GEO \
CONFIG_NGINX_DISABLE_HTTP_SPLIT_CLIENTS_MODULE \ CONFIG_NGINX_HTTP_MAP \
CONFIG_NGINX_DISABLE_HTTP_REFERER_MODULE \ CONFIG_NGINX_HTTP_SPLIT_CLIENTS \
CONFIG_NGINX_DISABLE_HTTP_REWRITE_MODULE \ CONFIG_NGINX_HTTP_REFERER \
CONFIG_NGINX_DISABLE_HTTP_PROXY_MODULE \ CONFIG_NGINX_HTTP_REWRITE \
CONFIG_NGINX_DISABLE_HTTP_FASTCGI_MODULE \ CONFIG_NGINX_HTTP_PROXY \
CONFIG_NGINX_DISABLE_HTTP_UWSGI_MODULE \ CONFIG_NGINX_HTTP_FASTCGI \
CONFIG_NGINX_DISABLE_HTTP_SCGI_MODULE \ CONFIG_NGINX_HTTP_UWSGI \
CONFIG_NGINX_DISABLE_HTTP_MEMCACHED_MODULE \ CONFIG_NGINX_HTTP_SCGI \
CONFIG_NGINX_DISABLE_HTTP_LIMIT_CONN_MODULE \ CONFIG_NGINX_HTTP_MEMCACHED \
CONFIG_NGINX_DISABLE_HTTP_LIMIT_REQ_MODULE \ CONFIG_NGINX_HTTP_LIMIT_CONN \
CONFIG_NGINX_DISABLE_HTTP_EMPTY_GIF_MODULE \ CONFIG_NGINX_HTTP_LIMIT_REQ \
CONFIG_NGINX_DISABLE_HTTP_BROWSER_MODULE \ CONFIG_NGINX_HTTP_EMPTY_GIF \
CONFIG_NGINX_DISABLE_HTTP_UPSTREAM_IP_HASH_MODULE CONFIG_NGINX_HTTP_BROWSER \
CONFIG_NGINX_HTTP_UPSTREAM_IP_HASH
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
@ -56,7 +57,7 @@ define Package/nginx
SUBMENU:=Web Servers/Proxies SUBMENU:=Web Servers/Proxies
TITLE:=Nginx web server TITLE:=Nginx web server
URL:=http://nginx.org/ URL:=http://nginx.org/
DEPENDS:=+!NGINX_DISABLE_PCRE:libpcre +NGINX_SSL:libopenssl +!NGINX_DISABLE_HTTP_GZIP_MODULE:zlib +libpthread +NGINX_MODULE_LUA:liblua DEPENDS:=+NGINX_PCRE:libpcre +NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC:libopenssl +NGINX_HTTP_GZIP:zlib +libpthread +NGINX_LUA:liblua
MENU:=1 MENU:=1
endef endef
@ -88,92 +89,90 @@ ifeq ($(CONFIG_NGINX_FLV),y)
endif endif
ifeq ($(CONFIG_NGINX_SSL),y) ifeq ($(CONFIG_NGINX_SSL),y)
ADDITIONAL_MODULES += --with-http_ssl_module ADDITIONAL_MODULES += --with-http_ssl_module
else
ADDITIONAL_MODULES += --without-http-cache
endif endif
ifeq ($(CONFIG_NGINX_DAV),y) ifeq ($(CONFIG_NGINX_DAV),y)
ADDITIONAL_MODULES += --with-http_dav_module ADDITIONAL_MODULES += --with-http_dav_module
endif endif
ifeq ($(CONFIG_NGINX_MODULE_LUA),y) ifeq ($(CONFIG_NGINX_LUA),y)
ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/lua-nginx ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/lua-nginx
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_CACHE),y) ifneq ($(CONFIG_NGINX_HTTP_CACHE),y)
ADDITIONAL_MODULES += --without-http-cache ADDITIONAL_MODULES += --without-http-cache
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_PCRE),y) ifneq ($(CONFIG_NGINX_PCRE),y)
ADDITIONAL_MODULES += --without-pcre ADDITIONAL_MODULES += --without-pcre
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_CHARSET_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_CHARSET),y)
ADDITIONAL_MODULES += --without-http_charset_module ADDITIONAL_MODULES += --without-http_charset_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_GZIP_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_GZIP),y)
ADDITIONAL_MODULES += --without-http_gzip_module ADDITIONAL_MODULES += --without-http_gzip_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_SSI_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_SSI),y)
ADDITIONAL_MODULES += --without-http_ssi_module ADDITIONAL_MODULES += --without-http_ssi_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_USERID_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_USERID),y)
ADDITIONAL_MODULES += --without-http_userid_module ADDITIONAL_MODULES += --without-http_userid_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_ACCESS_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_ACCESS),y)
ADDITIONAL_MODULES += --without-http_access_module ADDITIONAL_MODULES += --without-http_access_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_AUTH_BASIC_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_AUTH_BASIC),y)
ADDITIONAL_MODULES += --without-http_auth_basic_module ADDITIONAL_MODULES += --without-http_auth_basic_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_AUTOINDEX_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_AUTOINDEX),y)
ADDITIONAL_MODULES += --without-http_autoindex_module ADDITIONAL_MODULES += --without-http_autoindex_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_GEO_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_GEO),y)
ADDITIONAL_MODULES += --without-http_geo_module ADDITIONAL_MODULES += --without-http_geo_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_MAP_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_MAP),y)
ADDITIONAL_MODULES += --without-http_map_module ADDITIONAL_MODULES += --without-http_map_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_SPLIT_CLIENTS_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_SPLIT_CLIENTS),y)
ADDITIONAL_MODULES += --without-http_split_clients_module ADDITIONAL_MODULES += --without-http_split_clients_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_REFERER_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_REFERER),y)
ADDITIONAL_MODULES += --without-http_referer_module ADDITIONAL_MODULES += --without-http_referer_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_REWRITE_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_REWRITE),y)
ADDITIONAL_MODULES += --without-http_rewrite_module ADDITIONAL_MODULES += --without-http_rewrite_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_PROXY_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_PROXY),y)
ADDITIONAL_MODULES += --without-http_proxy_module ADDITIONAL_MODULES += --without-http_proxy_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_FASTCGI_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_FASTCGI),y)
ADDITIONAL_MODULES += --without-http_fastcgi_module ADDITIONAL_MODULES += --without-http_fastcgi_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_UWSGI_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_UWSGI),y)
ADDITIONAL_MODULES += --without-http_uwsgi_module ADDITIONAL_MODULES += --without-http_uwsgi_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_SCGI_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_SCGI),y)
ADDITIONAL_MODULES += --without-http_scgi_module ADDITIONAL_MODULES += --without-http_scgi_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_MEMCACHED_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_MEMCACHED),y)
ADDITIONAL_MODULES += --without-http_memcached_module ADDITIONAL_MODULES += --without-http_memcached_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_LIMIT_CONN_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_LIMIT_CONN),y)
ADDITIONAL_MODULES += --without-http_limit_conn_module ADDITIONAL_MODULES += --without-http_limit_conn_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_LIMIT_REQ_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_LIMIT_REQ),y)
ADDITIONAL_MODULES += --without-http_limit_req_module ADDITIONAL_MODULES += --without-http_limit_req_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_EMPTY_GIF_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_EMPTY_GIF),y)
ADDITIONAL_MODULES += --without-http_empty_gif_module ADDITIONAL_MODULES += --without-http_empty_gif_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_BROWSER_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_BROWSER),y)
ADDITIONAL_MODULES += --without-http_browser_module ADDITIONAL_MODULES += --without-http_browser_module
endif endif
ifeq ($(CONFIG_NGINX_DISABLE_HTTP_UPSTREAM_IP_HASH_MODULE),y) ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_IP_HASH),y)
ADDITIONAL_MODULES += --without-http_upstream_ip_hash_module ADDITIONAL_MODULES += --without-http_upstream_ip_hash_module
endif endif
define Build/Configure define Build/Configure
# TODO: fix --crossbuild # TODO: fix --crossbuild
(cd $(PKG_BUILD_DIR) ;\ (cd $(PKG_BUILD_DIR) ;\
$(if $(CONFIG_NGINX_MODULE_LUA),LUA_INC=$(STAGING_DIR)/usr/include LUA_LIB=$(STAGING_DIR)/usr/lib) \ $(if $(CONFIG_NGINX_LUA),LUA_INC=$(STAGING_DIR)/usr/include LUA_LIB=$(STAGING_DIR)/usr/lib) \
./configure \ ./configure \
--crossbuild=Linux::$(ARCH) \ --crossbuild=Linux::$(ARCH) \
--prefix=/usr \ --prefix=/usr \
@ -202,7 +201,7 @@ endef
define Build/Prepare define Build/Prepare
$(call Build/Prepare/Default) $(call Build/Prepare/Default)
$(if $(CONFIG_NGINX_MODULE_LUA),$(call Prepare/lua-nginx)) $(if $(CONFIG_NGINX_LUA),$(call Prepare/lua-nginx))
endef endef
define Download/lua-nginx define Download/lua-nginx