Building rpms (was Re: unable to make install under cygwin)

Ralf Corsepius corsepiu at faw.uni-ulm.de
Thu Mar 13 00:09:09 UTC 2003


Am Mit, 2003-03-12 um 21.09 schrieb Kamen Penev:
> Ralf Corsepius wrote:
> 
> >This is correct. DESTDIR normally is empty, and is supposed to be
> >provided from the environment if wanting to shift the root of
> >installation tree. It typically is applied for building rpms, which
> >temporary installs to a temporary directory.
> >  
> >
> 
> Interesting. Is this documented?

Do you mean DESTDIR?

DESTDIR is a Makefile convention supported by many Makefiles and by
newer (IIRC, >= 1.5) versions of automake.

>  If not, can you please briefly describe 
> the procedure.
Applying DESTDIR is simple, you can find examples on using it in many
rpm-specs.

Example:

Given an arbitrary package w/ DESTDIR support:

./configure --prefix=/somewhere

make
make DESTDIR=/tmp install

The last line will install the package to '/tmp' instead of '/', i.e.
the files normally installed to /somewhere will be copied/installed to
/tmp/somewhere

Inside of rpm.specs, the standard usage would be:

./configure --prefix=/somewhere
make
make DESTDIR=${RPM_BUILD_ROOT} install

rpm then will collect the files from below ${RPM_BUILD_ROOT}.

>  I'd like to be able to distribute prebuilt RTEMS to my 
> coworkers.
Check out scripts/cpukit, it contains a rough rpm.spec-skeleton of what you want.

Ralf





More information about the users mailing list