## START: Set by rpmautospec ## (rpmautospec version 0.8.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global _nginx_modsrcdir ../nginx Name: njs Version: 0.9.4 Release: %autorelease -p Summary: Subset of JavaScript language to use in NGINX License: BSD-2-Clause URL: https://github.com/nginx/njs Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Patch: %{url}/commit/5293090.patch#/njs-0.9.4-compatibility-with-QuickJS-NG-0.11.0.patch BuildRequires: gcc BuildRequires: libxslt-devel BuildRequires: nginx-mod-devel BuildRequires: openssl-devel BuildRequires: quickjs-ng-devel BuildRequires: zlib-devel %global _description %{expand: NGINX JavaScript, also known as NJS, is a dynamic module for NGINX that enables the extension of built-in functionality using familiar JavaScript syntax. The NJS language is a subset of JavaScript, compliant with ES5 (ECMAScript 5.1 Strict Variant) with some ES6 (ECMAScript 6) and newer extensions. } %description %{_description} %package -n nginx-mod-http-js Summary: NJS HTTP module for NGINX %description -n nginx-mod-http-js %{_description} This module allows using NJS scripting in the HTTP configuration block. %package -n nginx-mod-stream-js Summary: NJS stream module for NGINX Requires: nginx-mod-stream %description -n nginx-mod-stream-js %{_description} This module allows using NJS scripting in the stream configuration block. %prep %autosetup -p1 %build %nginx_modconfigure --with-stream=dynamic --with-http_ssl_module --with-stream_ssl_module %nginx_modbuild %install install -D -pv -m 0755 -t %{buildroot}%{nginx_moddir} \ %{_vpath_builddir}/ngx_{http,stream}_js_module.so mkdir -p %{buildroot}%{nginx_modconfdir} echo 'load_module "%{nginx_moddir}/ngx_http_js_module.so";' \ > %{buildroot}%{nginx_modconfdir}/mod-http-js.conf # sort after mod-stream.conf echo 'load_module "%{nginx_moddir}/ngx_stream_js_module.so";' \ > %{buildroot}%{nginx_modconfdir}/mod-stream_js.conf %files -n nginx-mod-http-js %license LICENSE %doc CHANGES README.md %{nginx_modconfdir}/mod-http-js.conf %{nginx_moddir}/ngx_http_js_module.so %files -n nginx-mod-stream-js %license LICENSE %doc CHANGES README.md %{nginx_modconfdir}/mod-stream_js.conf %{nginx_moddir}/ngx_stream_js_module.so %changelog ## START: Generated by rpmautospec * Sat Dec 27 2025 Aleksei Bavshin - 0.9.4-0.1 - Initial package ## END: Generated by rpmautospec