nginx/nginxmods.attr
Neal Gompa f1c10bd5e4 Add -mod-devel subpackage for building external nginx modules (rhbz#1989778)
This change makes it possible to easily build third-party modules as RPMs
on top of the nginx package.

Per the constraints defined by NGINX upstream on binary compatibility for
external third-party modules, we include generators to add an ABI dependency
automatically.
2021-08-10 12:30:05 -04:00

15 lines
517 B
Plaintext

%__nginxmods_requires() %{lua:
-- Match buildroot paths of the form
-- /PATH/OF/BUILDROOT/usr/lib/nginx/modules/ and
-- /PATH/OF/BUILDROOT/usr/lib64/nginx/modules/
-- generating a line of the form:
-- nginx(abi) = VERSION
local path = rpm.expand("%1")
if path:match("/usr/lib%d*/nginx/modules/.*") then
local requires = "nginx(abi) = " .. rpm.expand("%{_nginx_abiversion}")
print(requires)
end
}
%__nginxmods_path ^%{_prefix}/lib(64)?/nginx/modules/.*\\.so$