5

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?

030
  • 5,901
  • 13
  • 68
  • 110
infra.user
  • 53
  • 1
  • 3

4 Answers4

9

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.

mattdm
  • 6,600
  • 1
  • 26
  • 48
2

If you do rpmbuild --short-circuit -bi /path/to/specfile, it will skip the %prep and %build stages and go straight to the %install stage. That should do what you want.

Scrivener
  • 3,116
  • 1
  • 22
  • 24
0

rpmbuild -ba /path/to/specfile

phresus
  • 257
  • 1
  • 8
  • Thanks for the response, but that's not what I'm looking for. The command you provided is what I've been running. When I execute that command, it tries to run ./configure (with a bunch of params). For this package, there is no configure script and there is no need to build anything. I need to create an rpm that will run a script when it's installed on the destination system. – infra.user Dec 30 '10 at 22:11
-2

It's a kludge, but put a noop in %build and %configure ?

richo
  • 948
  • 1
  • 7
  • 16