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

prefix for rpmbuild?

New rpm builder here, so please point me in the right direction if I'm
posting to the wrong group, etc.

I'm attempting to build some packages, but I would like the initial build
made with the rpmbuild command to go to, say, /usr/local, and then have
the "rpm -i" command put it where ever it defaults.

The problem is, there seems to be only one default. For example, if I do
this in the SPEC file:

Prefix: /usr/local

Then the files will go into /usr because that is the default:

% rpm --eval %{_prefix}

Of course, that builds fine, and I could then:

rpm -i --prefix=/usr/local package.rpm

Now, I can force it to go to /usr/local in the build by doing this:

%define _prefix /usr/local
Prefix: /usr

But, then it isn't relocatable (well, it thinks it is, but --prefix has no

So, is there a way to get it to build in /usr/local but then default
correctly when installing? Or I am I just trying to do something that I
shouldn't be doing?

Thanks for any hints (hope that this is clear),


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