1
0

Makefile 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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.12.0
  6. PKG_RELEASE:= 1
  7. PKG_HASH:= b4222e26fdb620a8d3c3a3a8b955e08b713672e1bc5198d1e4f462308a795b30
  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. nginx-install:
  48. $(INSTALL_DIR) $(IDIR_NGINX)/usr/sbin $(IDIR_NGINX)/etc/nginx
  49. $(INSTALL_BIN) $(WRKINST)/usr/sbin/nginx \
  50. $(IDIR_NGINX)/usr/sbin
  51. for f in nginx.conf mime.types fastcgi_params koi-utf koi-win win-utf; do \
  52. cp ./files/$${f} \
  53. $(IDIR_NGINX)/etc/nginx ; \
  54. done
  55. $(INSTALL_DIR) $(IDIR_NGINX)/srv/www
  56. include $(ADK_TOPDIR)/mk/pkg-bottom.mk