Whilst attempting to package crystalspace I got sick of scanning the
configure.ac by hand, and wrote a script to try to automate this.
Attached is the result; you give it the path to an unpacked/prepped
source tree, and it looks inside at the
configure.ac/configure.in/configure scripts (if any), scouring them for
header file references, then using rpm and yum to figure out what
provides them, and finally spits out a sorted list of BuildRequires:
lines.
It uses some special-casing/heuristics/hacks to try to generate
something sane.
This was useful to me, and I suspect to other, so perhaps (suitably
renamed) it could live in the rpmdevtools package?
If anyone's familiar with the yum api, there's some major optimization
that could be done (I call out to yum each time, rather than setting it
up in code and amortizing the startup costs)
Hope this helps
Dave
Show replies by date