How to create an rpm without a build step

rpm

I'm trying to create an rpm of some code which doesn't need to be built. It will just need to run a script when it's installed on the destination system (i.e. I just need the %install portion of the spec file).

I've left both %build and %configure sections of my rpm spec file empty, yet rpmbuild continues to try and execute ./configure with a bunch of parameters.

Does anyone know how I can have rpmbuild create the rpm without trying to run ./configure?

Best Answer

The rpm specfile syntax is confusing. %configure isn't a section like %build is. It's a macro which expands to running ./configure with system-specific parameters. That's what you're seeing. And the solution is easy — remove it, and there you go.