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