Makefile 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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.11.1
  6. PKG_RELEASE:= 1
  7. PKG_HASH:= 5d8dd0197e3ffeb427729c045382182fb28db8e045c635221b2e0e6722821ad0
  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:= WITH_LIBRESSL WITHOUT_SSL
  17. PKGCD_WITH_LIBRESSL:= use libressl for crypto
  18. PKGCB_WITH_LIBRESSL:= libressl
  19. PKGCS_WITH_LIBRESSL:= libressl ca-certificates
  20. PKGCD_WITHOUT_SSL:= use no ssl
  21. include $(ADK_TOPDIR)/mk/package.mk
  22. $(eval $(call PKG_template,NGINX,nginx,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
  23. TARGET_CFLAGS+= -fPIC
  24. CONFIG_STYLE:= minimal
  25. CONFIGURE_ENV+= ngx_force_gcc_have_atomic=yes \
  26. ngx_force_have_libatomic=no
  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_LIBRESSL),y)
  44. CONFIGURE_ARGS+= --with-http_ssl_module
  45. endif
  46. ALL_TARGET:=
  47. XAKE_FLAGS+= GCC_HONOUR_COPTS=s
  48. nginx-install:
  49. $(INSTALL_DIR) $(IDIR_NGINX)/usr/sbin $(IDIR_NGINX)/etc/nginx
  50. $(INSTALL_BIN) $(WRKINST)/usr/sbin/nginx \
  51. $(IDIR_NGINX)/usr/sbin
  52. for f in nginx.conf mime.types fastcgi_params koi-utf koi-win win-utf; do \
  53. cp ./files/$${f} \
  54. $(IDIR_NGINX)/etc/nginx ; \
  55. done
  56. $(INSTALL_DIR) $(IDIR_NGINX)/srv/www
  57. include $(ADK_TOPDIR)/mk/pkg-bottom.mk