[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Portable, relocatable .spec files



On Mon, 2002-08-19 at 16:19, Harig, Mark A. wrote:
> However, I would also like to be able to make the
> .spec files relocatable, i.e., provide a 'prefix: ...'
> tag inside the .spec file so that:
> 
>    - packages can be built in a directory other
>      than /usr/src/redhat

This has nothing to do with the Prefix: line in the preamble.  You
simply need to redefine %_topdir to something else in your ~/.rpmmacros
file.

>    - a user can relocate the package at installation
>      by using the rpm '--prefix' command-line switch.

I have personally have never used the --prefix option.  Instead I have
used --relocate which allows you to translate paths without Prefix:
tags.

> In addition, is there a way to override the default
> definitions of %_bindir, %_sbindir, etc. if a
> package requires it?

IIRC, it is just

%define _bindir /foo/bar

> Are these two goals -- portability and relocatability --
> mutually exclusive?  If not, is there a documented way to
> do this?  I have been unable to find it in Maximum-RPM,
> the HOWTOs, or the documents included with rpm.

These should not be mutually exclusive.

Thanks.
Peter






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []