blob: b059160420e42cb4c4c69ff8a6d9141e814cbd56 [file] [log] [blame] [edit]
MODULES+= njs
MODULE_SUMMARY_njs= njs dynamic modules
MODULE_VERSION_njs= 0.5.3
MODULE_RELEASE_njs= 1
MODULE_VERSION_PREFIX_njs=$(MODULE_TARGET_PREFIX)
MODULE_SOURCES_njs= njs-$(MODULE_VERSION_njs).tar.gz
MODULE_CONFARGS_njs= --add-dynamic-module=njs-$(MODULE_VERSION_njs)/nginx
define MODULE_DEFINITIONS_njs
BuildRequires: libedit-devel
endef
export MODULE_DEFINITIONS_njs
define MODULE_PREBUILD_njs
cd %{bdir}/njs-$(MODULE_VERSION_njs) \&\& ./configure \&\& make njs
endef
export MODULE_PREBUILD_njs
define MODULE_PREINSTALL_njs
%{__install} -m644 %{bdir}/njs-$(MODULE_VERSION_njs)/CHANGES \
$$RPM_BUILD_ROOT%{_datadir}/doc/%{name}/
%{__mkdir} -p $$RPM_BUILD_ROOT%{_bindir}
%{__install} -m755 %{bdir}/njs-$(MODULE_VERSION_njs)/build/njs \
$$RPM_BUILD_ROOT%{_bindir}/
endef
export MODULE_PREINSTALL_njs
define MODULE_FILES_njs
%{_bindir}/njs
endef
export MODULE_FILES_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:
http://nginx.org/en/docs/njs/
http://nginx.org/en/docs/http/ngx_http_js_module.html
http://nginx.org/en/docs/stream/ngx_stream_js_module.html
----------------------------------------------------------------------
BANNER
endef
export MODULE_POST_njs