[packages] nginx: update to 0.7.65
[openwrt/svn-archive/archive.git] / net / nginx / Makefile
1 #
2 # Copyright (C) 2009-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=nginx
11 PKG_VERSION:=0.7.65
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://sysoev.ru/nginx/
16 PKG_MD5SUM:=abc4f76af450eedeb063158bd963feaa
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/nginx
21 SECTION:=net
22 CATEGORY:=Network
23 TITLE:=Nginx web server
24 URL:=http://nginx.net/
25 DEPENDS:=+libpcre +libopenssl
26 endef
27
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.
32 endef
33
34 config_files=nginx.conf mime.types fastcgi_params koi-utf koi-win win-utf
35
36 define Build/Configure
37 # fix --crossbuild
38 (cd $(PKG_BUILD_DIR) ;\
39 ./configure \
40 --crossbuild=Linux::$(ARCH) \
41 --prefix=/usr \
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 \
55 --with-ipv6 )
56 endef
57
58 define Build/Compile
59 $(MAKE) -C $(PKG_BUILD_DIR) \
60 DESTDIR=$(PKG_INSTALL_DIR) \
61 build install
62 endef
63
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
71 endef
72
73 $(eval $(call BuildPackage,nginx))