2020-04-09 11:36:16 +00:00
|
|
|
%__kmod_path ^/lib/modules/.*/(modules.builtin|.*ko)
|
|
|
|
%__kmod_provides() %{lua:
|
|
|
|
function basename(fn)
|
|
|
|
return string.gsub(fn, "(.*/)(.*)", "%2")
|
|
|
|
end
|
|
|
|
function printdep(mod)
|
|
|
|
print("kmod("..mod..")")
|
|
|
|
end
|
|
|
|
local fn = rpm.expand("%{1}")
|
|
|
|
local bn = basename(fn)
|
|
|
|
if bn == "modules.builtin" then
|
|
|
|
for l in io.lines(fn) do
|
|
|
|
printdep(basename(l))
|
|
|
|
end
|
|
|
|
else
|
|
|
|
local mod = string.match(bn, "%g+.ko")
|
|
|
|
if mod then
|
|
|
|
printdep(mod)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
}
|