RPM rebuild made easier?

Thomas Doerfler Thomas.Doerfler at imd-systems.de
Wed Feb 26 20:09:10 UTC 2003


we had a discussion about version dependent tool installation 
prefixes some weeks ago, and I accepted the reasons why the 
RPMs on OARs web server all use the standard prefix 
"/opt/rtems". My conclusion was (and is) that rebuilding the 
tools (under linux) is not so painful.

Now I have actually (once again) rebuilt the current toolset, 
and in the RPM specs found constucts to change the rebuild 
process with "--define" statements fromt the RPM command line.

So here is my request: Would it be possible to replace the 
"_prefix" definition in the specs from 

%define _prefix   /opt/rtems

to something like:

%define _prefix   %{?prefix:%prefix}%{!?prefix:/opt/rtems}

(Ralf, is this correct? Any improvements possible?)

The anybody who wants to rebuild the toolset simply has to 
call RPM as follows:

$ rpm -ba --define 'prefix /opt/rtems/binutils-
3.2.1-newlib-1.11.0' --define 'gnat 0' --define 'gcj 0' 

No more hacking around inside the specs...

Is it possible to integrate this into the toolse specs?


IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler           Herbststrasse 8
D-82178 Puchheim          Germany
email:    Thomas.Doerfler at imd-systems.de
PGP public key available at: http://www.imd-

More information about the users mailing list