[CentOS] Automating the preparation of kernel sources

Thu Aug 7 00:11:56 UTC 2014
Markus Falb <markus.falb at fasel.at>

On 5.8.2014 03:24, BC wrote:
> I have a driver that requires installing the kernel sources (into my own
> rpmbuild tree, not the system) 

Why not define the kernel source as buildrequire?

> I can successfully compile and install the module from tarball after
> manually prepping the kernel sources, but I need to turn this into a proper
> RPM and am wondering if there are macros I'm not seeing for how to prep the
> kernel sources as part of a %prep or %build phase. I have looked at many
> real-world spec files and googled all afternoon and cannot find any info on
> this.

Have a look at the %setup macro and it's parameters
http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch09s04.html#id796983

-- 
Kind Regards, Markus Falb