Makefile 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(ADK_TOPDIR)/rules.mk
  4. PKG_NAME:= nginx
  5. PKG_VERSION:= 1.8.0
  6. PKG_RELEASE:= 1
  7. PKG_HASH:= 23cca1239990c818d8f6da118320c4979aadf5386deda691b1b7c2c96b9df3d5
  8. PKG_DESCR:= powerful http reverse proxy and webserver
  9. PKG_SECTION:= net/http
  10. PKG_BUILDDEP:= pcre zlib
  11. PKG_DEPENDS:= libpcre libpthread zlib
  12. PKG_URL:= http://nginx.org/
  13. PKG_SITES:= http://nginx.org/download/
  14. DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
  15. PKG_CHOICES_NGINX:= WITHOUT_SSL WITH_LIBRESSL WITH_OPENSSL
  16. PKGCD_WITHOUT_SSL:= use no ssl
  17. PKGCD_WITH_LIBRESSL:= use libressl for crypto
  18. PKGCB_WITH_LIBRESSL:= libressl
  19. PKGCS_WITH_LIBRESSL:= libressl ca-certificates
  20. PKGCD_WITH_OPENSSL:= use openssl for crypto
  21. PKGCB_WITH_OPENSSL:= openssl
  22. PKGCS_WITH_OPENSSL:= libopenssl ca-certificates
  23. include $(ADK_TOPDIR)/mk/package.mk
  24. $(eval $(call PKG_template,NGINX,nginx,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
  25. CONFIG_STYLE:= minimal
  26. TARGET_CFLAGS+= -fPIC
  27. CONFIGURE_ARGS:= --prefix=/srv/www \
  28. --sbin-path=/usr/sbin \
  29. --crossbuild=Linux::$(ADK_TARGET_ARCH) \
  30. --with-cc='$(TARGET_CC)' \
  31. --with-cc-opt='$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)' \
  32. --with-ld-opt='$(TARGET_LDFLAGS)' \
  33. --conf-path=/etc/nginx/nginx.conf \
  34. --error-log-path=/var/log/nginx-error.log \
  35. --pid-path=/var/run/nginx.pid \
  36. --lock-path=/var/lock/nginx.lock \
  37. --http-log-path=/var/log/nginx-access.log \
  38. --http-client-body-temp-path=/var/lib/nginx/body \
  39. --http-proxy-temp-path=/var/lib/nginx/proxy \
  40. --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
  41. --http-scgi-temp-path=/var/lib/nginx/uwsgi \
  42. --http-uwsgi-temp-path=/var/lib/nginx/uwsgi
  43. ifeq ($(ADK_PACKAGE_NGINX_WITH_OPENSSL),y)
  44. CONFIGURE_ARGS+= --with-http_ssl_module
  45. endif
  46. ifeq ($(ADK_PACKAGE_NGINX_WITH_LIBRESSL),y)
  47. CONFIGURE_ARGS+= --with-http_ssl_module
  48. endif
  49. ALL_TARGET:=
  50. XAKE_FLAGS+= GCC_HONOUR_COPTS=s
  51. nginx-install:
  52. $(INSTALL_DIR) $(IDIR_NGINX)/usr/sbin $(IDIR_NGINX)/etc/nginx
  53. $(INSTALL_BIN) $(WRKINST)/usr/sbin/nginx \
  54. $(IDIR_NGINX)/usr/sbin
  55. for f in nginx.conf mime.types fastcgi_params koi-utf koi-win win-utf; do \
  56. cp $(WRKINST)/etc/nginx/$${f} \
  57. $(IDIR_NGINX)/etc/nginx ; \
  58. done
  59. $(INSTALL_DIR) $(IDIR_NGINX)/srv/www
  60. include $(ADK_TOPDIR)/mk/pkg-bottom.mk