Changeset 22807


Ignore:
Timestamp:
2010-08-26T02:05:56+02:00 (6 years ago)
Author:
benoar
Message:

[package] nginx: packaging enhancements

  • add a separate config menu for optionnal modules (not every possible module are here; just taken the ones Debian enables). By default they are all disabled, so this removes the default dependency on libopenssl.
  • correctly listed conffiles
  • enable IPv6 only when CONFIG_IPV6 is set
  • change the default listening adress in nginx.conf when IPv6 is enabled so that it listens on [::]
Location:
packages/net/nginx
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • packages/net/nginx/Makefile

    r21063 r22807  
    2323  TITLE:=Nginx web server 
    2424  URL:=http://nginx.net/ 
    25   DEPENDS:=+libpcre +libopenssl 
     25  DEPENDS:=+libpcre 
     26  MENU:=1 
    2627endef 
    2728 
     
    3233endef 
    3334 
     35define Package/nginx/config 
     36        source "$(SOURCE)/Config.in" 
     37endef 
     38 
    3439config_files=nginx.conf mime.types fastcgi_params koi-utf koi-win win-utf 
    3540 
     41define Package/nginx/conffiles 
     42/etc/nginx/nginx.conf 
     43/etc/nginx/mime.types 
     44/etc/nginx/fastcgi_params 
     45/etc/nginx/koi-utf 
     46/etc/nginx/koi-win 
     47/etc/nginx/win-utf 
     48endef 
     49 
     50ADDITIONAL_MODULES:= 
     51 
     52ifeq ($(CONFIG_IPV6),y) 
     53  ADDITIONAL_MODULES += --with-ipv6 
     54endif 
     55ifeq ($(CONFIG_NGINX_STUB_STATUS),y) 
     56  ADDITIONAL_MODULES += --with-http_stub_status_module 
     57endif 
     58ifeq ($(CONFIG_NGINX_FLV),y) 
     59  ADDITIONAL_MODULES += --with-http_flv_module 
     60endif 
     61ifeq ($(CONFIG_NGINX_SSL),y) 
     62  ADDITIONAL_MODULES += --with-http_ssl_module 
     63endif 
     64ifeq ($(CONFIG_NGINX_DAV),y) 
     65  ADDITIONAL_MODULES += --with-http_dav_module 
     66endif 
     67 
    3668define Build/Configure 
    37         # fix --crossbuild 
     69        # TODO: fix --crossbuild 
    3870        (cd $(PKG_BUILD_DIR) ;\ 
    3971                ./configure \ 
     
    5183                        --with-cc-opt="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \ 
    5284                        --with-ld-opt="$(TARGET_LDFLAGS)" \ 
    53                         --with-http_stub_status_module \ 
    54                         --with-http_ssl_module \ 
    55                         --with-ipv6 ) 
     85                        $(ADDITIONAL_MODULES) ) 
    5686endef 
    5787 
     
    6797        $(INSTALL_DIR) $(1)/etc/nginx 
    6898        $(INSTALL_DATA) $(addprefix $(PKG_INSTALL_DIR)/etc/nginx/,$(config_files)) $(1)/etc/nginx 
     99        # make nginx bind on both IPv4 and IPv6 by default, when available 
     100  ifeq ($(CONFIG_IPV6),y) 
     101        $(SED) 's/listen\( \+\)80;/listen\1[::]:80;/' $(1)/etc/nginx/nginx.conf 
     102  endif 
    69103        $(INSTALL_DIR) $(1)/etc/init.d 
    70104        $(INSTALL_BIN) ./files/nginx.init $(1)/etc/init.d/nginx 
Note: See TracChangeset for help on using the changeset viewer.