On Tue, 30 Mar 2004, James Olin Oden wrote: > On Tue, 30 Mar 2004, Cameron, Thomas wrote: > > > Howdy all - > > > > Forgive my ingnorance, but I am fairly new to building RPMs. > > > > I have built an RPM for a kernel module for Linux on the mainframe, > > but I had to hard code /lib/modules/2.4.21-9.EL/misc in the %install > > section of the spec file. > > > > Is there a way to specify the /lib/modules/`uname -r`/misc directory > > so that the kernel module gets put in the correct directory based on > > the running version of the kernel? > > > Yeah sure, you need to use the %() macro. It allows you to do what > back ticks do. The only problem is that it will only do this at build > time (i.e. it evaluates the macro at build time not install time). Yup, you'll want to make it possible to override the target kernel version. There are countless gotchas in kernel module packaging, luckily most of them have bearable workarounds. Have a look at alsa-driver src.rpm at fedora.us repository for an example how to deal with various issues like getting the correct build flags from the kernel source, how to set dependencies (hint: "Requires: kernel = <version>-<release>" wont cut it with RH kernels) etc. - Panu - _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list