The %files
section must list every file which will be included in the binary package, and therefore installed on target machines.
If you're making the RPM by the book, then the spec files serves two somewhat separate purposes. It's a build script, detailing how to convert the source code into build artifacts, and a packaging script, detailing what build products should be installed on the destination machines. In your case, the build aspect is very lightweight.
In this traditional approach, the makefile is run during the build phase, and the %files
directive lists which of the resulting build artifacts should be installed. To be clear, you would either not use make install
with the traditional approach, or you would use it with DESTDIR
to install into the RPM build directory (ie not into /usr/lib/python/foo
but into ~/rpmbuild/BUILD/usr/lib/python/foo
or something), from where you would then select files with %files
.
So, what you should do is to have some prior section (probably %install
) run the makefile to install into the build area, and then use the %files
section to pick out the results. Remember that you can use wildcards in the %files
section, so you don't have to explicitly name every individual file.
Does that make sense? Have i misunderstood your question?