* Zvezdan Petkovic <[EMAIL PROTECTED]> [2001-08-16 22:20] wrote:
> On Thu, Aug 16, 2001 at 08:41:23PM +0200, Ronny Buchmann wrote:
> > > %define _prefix /usr/local
> > you dont need this, use "Prefix: /usr/local" instead
> > 
> 
> Well, I told you I build RPMs quite often. The above is not correct.
> You can test and see for yourself.
> 
> Prefix: /usr/local
> 
> is used to tell rpm that the package is relocatable. Later, when you
> install such a package you can say "rpm -i --prefix /opt" and it
> would go to /opt instead of /usr/local. If you look in my LyX spec
> you'll notice the following:
> 
> Prefix: %{_prefix}
> Prefix: %{_sysconfdir}
> 
> Since I didn't redefine anything, the first one is /usr the second one
> is /etc. I need two because KDE desktop entry for LyX goes in
> /etc/X11/applnk/Applications/lyx.desktop
> 
> Since that path is not in /usr rpm would refuse to build a package
> because the first Prefix: tells it that it is relocatable, and it can
> see that /etc is not under /usr and hence can't find the way to relocate
> it. Only defining two Prefix: entries the package is built as
> relocatable. It can be relocated using, for example:
> 
>     rpm -i --relocate /usr=/opt -relocate /etc=/etc/opt
yes, you're right i found the docs now http://www.rpm.org/rpmapi-4.1/relocateable.html
sorry for my ignorance

is this new with rpm-4.x ?
i've never heard before that it is possible to have more than one Prefix: per spec file

i will check which macros are available in rpm-3.x used by suse (btw, this is used by 
~70% in germany)
than we can look for optimal solution

-- 
thanks
ronny

Reply via email to