Makefile 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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.30.0
  6. PKG_RELEASE:= 1
  7. PKG_HASH:= 058188c64bf22baecaa72b809a6318a4f9ba623889c554feab03f7cb853ab31b
  8. PKG_DESCR:= powerful http reverse proxy and webserver
  9. PKG_SECTION:= net/http
  10. PKG_BUILDDEP:= pcre2 zlib
  11. PKG_DEPENDS:= pcre2 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_OPENSSL WITHOUT_SSL
  17. PKGCD_WITH_OPENSSL:= use openssl for crypto
  18. PKGCB_WITH_OPENSSL:= openssl
  19. PKGCS_WITH_OPENSSL:= openssl 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. --without-http_upstream_zone_module
  44. ifeq ($(ADK_PACKAGE_NGINX_WITH_OPENSSL),y)
  45. CONFIGURE_ARGS+= --with-http_ssl_module
  46. endif
  47. ALL_TARGET:=
  48. nginx-install:
  49. $(INSTALL_DIR) $(IDIR_NGINX)/usr/sbin $(IDIR_NGINX)/etc/nginx
  50. $(INSTALL_BIN) $(WRKBUILD)/objs/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