blob: 50fdaaac3b71a870421f78d3e5cbf4602e7e86d7 [file] [log] [blame]
MODULES+= njs
MODULE_SUMMARY_njs= njs dynamic modules
include $(CONTRIB)/src/njs/version
MODULE_VERSION_njs= $(NJS_VERSION)
MODULE_RELEASE_njs= 1
MODULE_SOURCES_njs= njs-$(NJS_VERSION).tar.gz
MODULE_CONFARGS_njs= --add-dynamic-module=$(MODSRC_PREFIX)njs-$(NJS_VERSION)/nginx
.deps-module-njs:
cd $(CONTRIB) && make .sum-njs
touch $@
MODULE_VERSION_PREFIX_njs=$(MODULE_TARGET_PREFIX)
MODULE_BUILD_DEPENDS_njs=,libedit-dev
define MODULE_PREBUILD_njs
cd debian/extra/njs-$(NJS_VERSION) \&\& ./configure \&\& make njs
endef
export MODULE_PREBUILD_njs
define MODULE_PREINSTALL_njs
mkdir -p $$(INSTALLDIR)/usr/share/doc/nginx$(MODULE_SUFFIX)-module-njs
install -m644 $$(BUILDDIR_nginx)/extra/njs-$(NJS_VERSION)/CHANGES $$(INSTALLDIR)/usr/share/doc/nginx$(MODULE_SUFFIX)-module-njs/
mkdir -p $$(INSTALLDIR)/usr/bin
install -m755 $$(CURDIR)/debian/extra/njs-$(NJS_VERSION)/build/njs $$(INSTALLDIR)/usr/bin/
endef
export MODULE_PREINSTALL_njs
define MODULE_POST_njs
cat <<BANNER
----------------------------------------------------------------------
The $(MODULE_SUMMARY_njs) for $(MODULE_SUMMARY_PREFIX) have been installed.
To enable these modules, add the following to /etc/nginx/nginx.conf
and reload nginx:
load_module modules/ngx_http_js_module.so;
load_module modules/ngx_stream_js_module.so;
Please refer to the modules documentation for further details:
https://nginx.org/en/docs/njs/
https://nginx.org/en/docs/http/ngx_http_js_module.html
https://nginx.org/en/docs/stream/ngx_stream_js_module.html
----------------------------------------------------------------------
BANNER
endef
export MODULE_POST_njs