Blame SOURCES/kmod.attr

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