4f170fbd11
important fixes in changelog of 1.0.10 nginx from the current 1.0.8 in trunk: http://nginx.org/en/CHANGES-1.0 Signed-off-by: Daniel Petre <dani@ip6.ro> git-svn-id: svn://svn.openwrt.org/openwrt/packages@29361 3c298f89-4303-0410-b956-a3cf2f4a3e73
114 lines
2.9 KiB
Makefile
114 lines
2.9 KiB
Makefile
#
|
|
# Copyright (C) 2009-2011 OpenWrt.org
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=nginx
|
|
PKG_VERSION:=1.0.10
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
PKG_SOURCE_URL:=http://nginx.org/download/
|
|
PKG_MD5SUM:=930b297b00fa1018fb0a1dd3e6b7e17e
|
|
|
|
PKG_BUILD_PARALLEL:=1
|
|
PKG_INSTALL:=1
|
|
|
|
PKG_CONFIG_DEPENDS:=\
|
|
CONFIG_NGINX_STUB_STATUS \
|
|
CONFIG_NGINX_FLV \
|
|
CONFIG_NGINX_SSL \
|
|
CONFIG_NGINX_DAV
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/nginx
|
|
SECTION:=net
|
|
CATEGORY:=Network
|
|
SUBMENU:=Web Servers/Proxies
|
|
TITLE:=Nginx web server
|
|
URL:=http://nginx.org/
|
|
DEPENDS:=+libpcre +NGINX_SSL:libopenssl +zlib
|
|
MENU:=1
|
|
endef
|
|
|
|
define Package/nginx/description
|
|
Nginx is a free, open-source, high-performance HTTP server
|
|
and reverse proxy, as well as an IMAP/POP3 proxy server,
|
|
written by Igor Sysoev.
|
|
endef
|
|
|
|
define Package/nginx/config
|
|
source "$(SOURCE)/Config.in"
|
|
endef
|
|
|
|
config_files=nginx.conf mime.types fastcgi_params koi-utf koi-win win-utf
|
|
|
|
define Package/nginx/conffiles
|
|
/etc/nginx/nginx.conf
|
|
/etc/nginx/mime.types
|
|
/etc/nginx/fastcgi_params
|
|
/etc/nginx/koi-utf
|
|
/etc/nginx/koi-win
|
|
/etc/nginx/win-utf
|
|
endef
|
|
|
|
ADDITIONAL_MODULES:=
|
|
|
|
ifeq ($(CONFIG_IPV6),y)
|
|
ADDITIONAL_MODULES += --with-ipv6
|
|
endif
|
|
ifeq ($(CONFIG_NGINX_STUB_STATUS),y)
|
|
ADDITIONAL_MODULES += --with-http_stub_status_module
|
|
endif
|
|
ifeq ($(CONFIG_NGINX_FLV),y)
|
|
ADDITIONAL_MODULES += --with-http_flv_module
|
|
endif
|
|
ifeq ($(CONFIG_NGINX_SSL),y)
|
|
ADDITIONAL_MODULES += --with-http_ssl_module
|
|
else
|
|
ADDITIONAL_MODULES += --without-http-cache
|
|
endif
|
|
ifeq ($(CONFIG_NGINX_DAV),y)
|
|
ADDITIONAL_MODULES += --with-http_dav_module
|
|
endif
|
|
|
|
define Build/Configure
|
|
# TODO: fix --crossbuild
|
|
(cd $(PKG_BUILD_DIR) ;\
|
|
./configure \
|
|
--crossbuild=Linux::$(ARCH) \
|
|
--prefix=/usr \
|
|
--conf-path=/etc/nginx/nginx.conf \
|
|
--error-log-path=/var/log/nginx/error.log \
|
|
--pid-path=/var/run/nginx.pid \
|
|
--lock-path=/var/lock/nginx.lock \
|
|
--http-log-path=/var/log/nginx/access.log \
|
|
--http-client-body-temp-path=/var/lib/nginx/body \
|
|
--http-proxy-temp-path=/var/lib/nginx/proxy \
|
|
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
|
|
--with-cc="$(TARGET_CC)" \
|
|
--with-cc-opt="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
|
|
--with-ld-opt="$(TARGET_LDFLAGS)" \
|
|
$(ADDITIONAL_MODULES) )
|
|
endef
|
|
|
|
define Package/nginx/install
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nginx $(1)/usr/sbin/
|
|
$(INSTALL_DIR) $(1)/etc/nginx
|
|
$(INSTALL_DATA) $(addprefix $(PKG_INSTALL_DIR)/etc/nginx/,$(config_files)) $(1)/etc/nginx/
|
|
# make nginx bind on both IPv4 and IPv6 by default, when available
|
|
ifeq ($(CONFIG_IPV6),y)
|
|
$(SED) 's/listen\( \+\)80;/listen\1[::]:80;/' $(1)/etc/nginx/nginx.conf
|
|
endif
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
$(INSTALL_BIN) ./files/nginx.init $(1)/etc/init.d/nginx
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,nginx))
|