Makefile 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 zlib
  12. PKG_NEEDS:= threads
  13. PKG_URL:= http://nginx.org/
  14. PKG_SITES:= http://nginx.org/download/
  15. DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
  16. PKG_CHOICES_NGINX:= WITHOUT_SSL WITH_LIBRESSL WITH_OPENSSL
  17. PKGCD_WITHOUT_SSL:= use no ssl
  18. PKGCD_WITH_LIBRESSL:= use libressl for crypto
  19. PKGCB_WITH_LIBRESSL:= libressl
  20. PKGCS_WITH_LIBRESSL:= libressl ca-certificates
  21. PKGCD_WITH_OPENSSL:= use openssl for crypto
  22. PKGCB_WITH_OPENSSL:= openssl
  23. PKGCS_WITH_OPENSSL:= libopenssl ca-certificates
  24. include $(ADK_TOPDIR)/mk/package.mk
  25. $(eval $(call PKG_template,NGINX,nginx,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
  26. CONFIG_STYLE:= minimal
  27. TARGET_CFLAGS+= -fPIC
  28. CONFIGURE_ARGS:= --prefix=/srv/www \
  29. --sbin-path=/usr/sbin \
  30. --crossbuild=Linux::$(ADK_TARGET_ARCH) \
  31. --with-cc='$(TARGET_CC)' \
  32. --with-cc-opt='$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)' \
  33. --with-ld-opt='$(TARGET_LDFLAGS)' \
  34. --conf-path=/etc/nginx/nginx.conf \
  35. --error-log-path=/var/log/nginx-error.log \
  36. --pid-path=/var/run/nginx.pid \
  37. --lock-path=/var/lock/nginx.lock \
  38. --http-log-path=/var/log/nginx-access.log \
  39. --http-client-body-temp-path=/var/lib/nginx/body \
  40. --http-proxy-temp-path=/var/lib/nginx/proxy \
  41. --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
  42. --http-scgi-temp-path=/var/lib/nginx/uwsgi \
  43. --http-uwsgi-temp-path=/var/lib/nginx/uwsgi
  44. ifeq ($(ADK_PACKAGE_NGINX_WITH_OPENSSL),y)
  45. CONFIGURE_ARGS+= --with-http_ssl_module
  46. endif
  47. ifeq ($(ADK_PACKAGE_NGINX_WITH_LIBRESSL),y)
  48. CONFIGURE_ARGS+= --with-http_ssl_module
  49. endif
  50. ALL_TARGET:=
  51. XAKE_FLAGS+= GCC_HONOUR_COPTS=s
  52. nginx-install:
  53. $(INSTALL_DIR) $(IDIR_NGINX)/usr/sbin $(IDIR_NGINX)/etc/nginx
  54. $(INSTALL_BIN) $(WRKINST)/usr/sbin/nginx \
  55. $(IDIR_NGINX)/usr/sbin
  56. for f in nginx.conf mime.types fastcgi_params koi-utf koi-win win-utf; do \
  57. cp ./files/$${f} \
  58. $(IDIR_NGINX)/etc/nginx ; \
  59. done
  60. $(INSTALL_DIR) $(IDIR_NGINX)/srv/www
  61. include $(ADK_TOPDIR)/mk/pkg-bottom.mk