2 # Copyright (C) 2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=http
://sysoev.ru
/nginx
/
16 PKG_MD5SUM
:=cfa97c0f784532820110b5eee57fef6d
18 include $(INCLUDE_DIR
)/package.mk
23 DEPENDS
:=+libpcre
+libopenssl
24 TITLE
:=Nginx web server
25 URL
:=http
://nginx.net
/
28 define Package
/nginx
/description
29 Nginx is a free
, open-source
, high-performance HTTP server
30 and reverse proxy
, as well
as an IMAP
/POP3 proxy server
,
31 written by Igor Sysoev.
34 config_files
=nginx.conf mime.types fastcgi_params koi-utf koi-win win-utf
36 define Build
/Configure
38 (cd
$(PKG_BUILD_DIR
) ;\
40 --crossbuild
=Linux
::$(ARCH
) \
42 --conf-path
=/etc
/nginx
/nginx.conf \
43 --error-log-path
=/var
/log
/nginx
/error.log \
44 --pid-path
=/var
/run
/nginx.pid \
45 --lock-path
=/var
/lock
/nginx.lock \
46 --http-log-path
=/var
/log
/nginx
/access.log \
47 --http-client-body-temp-path
=/var
/lib
/nginx
/body \
48 --http-proxy-temp-path
=/var
/lib
/nginx
/proxy \
49 --http-fastcgi-temp-path
=/var
/lib
/nginx
/fastcgi \
50 --with-cc
="$(TARGET_CC)" \
51 --with-cc-opt
="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
52 --with-ld-opt
="$(TARGET_LDFLAGS)" \
53 --with-http_stub_status_module \
54 --with-http_ssl_module \
59 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
60 DESTDIR
=$(PKG_INSTALL_DIR
) \
64 define Package
/nginx
/install
65 $(INSTALL_DIR
) $(1)/usr
/sbin
66 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/nginx
$(1)/usr
/sbin
/
67 $(INSTALL_DIR
) $(1)/etc
/nginx
68 $(INSTALL_DATA
) $(addprefix $(PKG_INSTALL_DIR
)/etc
/nginx
/,$(config_files
)) $(1)/etc
/nginx
69 $(INSTALL_DIR
) $(1)/etc
/init.d
70 $(INSTALL_BIN
) .
/files
/nginx.init
$(1)/etc
/init.d
/nginx
73 $(eval
$(call BuildPackage
,nginx
))