Makefile 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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.7.9
  6. PKG_RELEASE:= 1
  7. PKG_HASH:= 1aafc7f0f530ddaa86d4ba24c14941ce0a584cc896f8261d6218f99625318f8a
  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. --user=www \
  30. --group=www \
  31. --crossbuild=Linux::$(ADK_TARGET_ARCH) \
  32. --with-cc='$(TARGET_CC)' \
  33. --with-cc-opt='$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)' \
  34. --with-ld-opt='$(TARGET_LDFLAGS)' \
  35. --conf-path=/etc/nginx/nginx.conf \
  36. --error-log-path=/var/log/nginx-error.log \
  37. --pid-path=/var/run/nginx.pid \
  38. --lock-path=/var/lock/nginx.lock \
  39. --http-log-path=/var/log/nginx-access.log \
  40. --http-client-body-temp-path=/var/lib/nginx/body \
  41. --http-proxy-temp-path=/var/lib/nginx/proxy \
  42. --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
  43. --http-scgi-temp-path=/var/lib/nginx/uwsgi \
  44. --http-uwsgi-temp-path=/var/lib/nginx/uwsgi
  45. ifeq ($(ADK_PACKAGE_NGINX_WITH_OPENSSL),y)
  46. CONFIGURE_ARGS+= --with-http_ssl_module
  47. endif
  48. ifeq ($(ADK_PACKAGE_NGINX_WITH_LIBRESSL),y)
  49. CONFIGURE_ARGS+= --with-http_ssl_module
  50. endif
  51. ALL_TARGET:=
  52. XAKE_FLAGS+= GCC_HONOUR_COPTS=s
  53. nginx-install:
  54. $(INSTALL_DIR) $(IDIR_NGINX)/usr/sbin $(IDIR_NGINX)/etc/nginx
  55. $(INSTALL_BIN) $(WRKINST)/usr/sbin/nginx \
  56. $(IDIR_NGINX)/usr/sbin
  57. for f in nginx.conf mime.types fastcgi_params koi-utf koi-win win-utf; do \
  58. cp $(WRKINST)/etc/nginx/$${f} \
  59. $(IDIR_NGINX)/etc/nginx ; \
  60. done
  61. $(INSTALL_DIR) $(IDIR_NGINX)/srv/www
  62. include ${ADK_TOPDIR}/mk/pkg-bottom.mk