diff options
Diffstat (limited to 'package/nginx')
-rw-r--r-- | package/nginx/Makefile | 39 | ||||
-rw-r--r-- | package/nginx/files/nginx.init | 1 | ||||
-rw-r--r-- | package/nginx/files/nginx.postinst | 4 |
3 files changed, 25 insertions, 19 deletions
diff --git a/package/nginx/Makefile b/package/nginx/Makefile index 804b6309f..53fe3d4f8 100644 --- a/package/nginx/Makefile +++ b/package/nginx/Makefile @@ -5,18 +5,22 @@ include $(ADK_TOPDIR)/rules.mk PKG_NAME:= nginx PKG_VERSION:= 1.7.8 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= fd5ab813fc1853cd8efe580ead577c3e PKG_DESCR:= powerful http reverse proxy and webserver PKG_SECTION:= net/http -PKG_BUILDDEP:= openssl pcre zlib -PKG_DEPENDS:= libopenssl libpcre libpthread zlib +PKG_BUILDDEP:= pcre zlib +PKG_DEPENDS:= libpcre libpthread zlib PKG_URL:= http://nginx.org/ PKG_SITES:= http://nginx.org/download/ DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz -# flavours for speedy and ssl +PKG_CHOICES_NGINX:= WITHOUT_SSL WITH_OPENSSL +PKGCD_WITHOUT_SSL:= use no ssl +PKGCD_WITH_OPENSSL:= use openssl for crypto +PKGCB_WITH_OPENSSL:= openssl +PKGCS_WITH_OPENSSL:= libopenssl ca-certificates include $(ADK_TOPDIR)/mk/package.mk @@ -24,23 +28,27 @@ $(eval $(call PKG_template,NGINX,nginx,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPEN CONFIG_STYLE:= minimal TARGET_CFLAGS+= -fPIC -CONFIGURE_ARGS:= --prefix=/srv/nginx \ +CONFIGURE_ARGS:= --prefix=/srv/www \ --sbin-path=/usr/sbin \ - --user=nginx \ - --group=nginx \ + --user=www \ + --group=www \ --crossbuild=Linux::$(ADK_TARGET_ARCH) \ - --with-cc="$(TARGET_CC)" \ - --with-cc-opt="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \ - --with-ld-opt="$(TARGET_LDFLAGS)" \ + --with-cc='$(TARGET_CC)' \ + --with-cc-opt='$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)' \ + --with-ld-opt='$(TARGET_LDFLAGS)' \ --conf-path=/etc/nginx/nginx.conf \ - --error-log-path=/var/log/nginx/error.log \ + --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-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-http_ssl_module + --http-fastcgi-temp-path=/var/lib/nginx/fastcgi + +ifeq ($(ADK_PACKAGE_NGINX_WITH_OPENSSL),y) +CONFIGURE_ARGS+= --with-http_ssl_module +endif + ALL_TARGET:= XAKE_FLAGS+= GCC_HONOUR_COPTS=s @@ -52,7 +60,6 @@ nginx-install: cp $(WRKINST)/etc/nginx/$${f} \ $(IDIR_NGINX)/etc/nginx ; \ done - $(INSTALL_DIR) $(IDIR_NGINX)/srv/nginx/html - $(CP) $(WRKINST)/srv/nginx/html/* $(IDIR_NGINX)/srv/nginx/html + $(INSTALL_DIR) $(IDIR_NGINX)/srv/www include ${ADK_TOPDIR}/mk/pkg-bottom.mk diff --git a/package/nginx/files/nginx.init b/package/nginx/files/nginx.init index 4bb61479a..2e391afed 100644 --- a/package/nginx/files/nginx.init +++ b/package/nginx/files/nginx.init @@ -12,7 +12,6 @@ autostart) ;; start) [ -d /var/lib/nginx ] || mkdir -p /var/lib/nginx - [ -d /var/log/nginx ] || mkdir -p /var/log/nginx [ -d /var/lock/nginx ] || mkdir -p /var/lock/nginx /usr/sbin/nginx ;; diff --git a/package/nginx/files/nginx.postinst b/package/nginx/files/nginx.postinst index fcb1a013f..cfe33a1ef 100644 --- a/package/nginx/files/nginx.postinst +++ b/package/nginx/files/nginx.postinst @@ -2,6 +2,6 @@ . $IPKG_INSTROOT/etc/functions.sh add_rcconf nginx NO gid=$(get_next_gid) -add_group nginx $gid -add_user nginx $(get_next_uid) $gid /tmp/.nginx +add_group www $gid +add_user www $(get_next_uid) $gid /srv/www |