RPM Community Forums

Mailing List Message of <rpm-users>

Re: Spec file help

From: Anders F Björklund <afb@rpm5.org>
Date: Mon 22 Dec 2008 - 17:35:23 CET
Message-Id: <2B210A32-8FAC-4FD7-9327-2D923916A6F6@rpm5.org>
Eric MSP Veith wrote:

> what you've spotted there are issues specific to my own build system.
> The %{__make_install} macro is defined as %{__fakeroot} %{__make}  
> install
> and is just a shortcut for me.

Sure, just that you get the funky "fg: no job control"
when they are not defined. %{__fakeroot} is a nice touch,
easy enough to stub out where the program is not available...
(guess I didn't have to mention it's not defined either)

>> And these lines are not needed anymore, with RPM 5:
>> Buildroot: %{_tmppath}/%{name}-root
>> [[ '%{buildroot}' != '/' ]] && %{__rm} -rf '%{buildroot}'
>> The BuildRoot is automatically handled by RPM now...
>
> I didn't know this. How is it handled?

Pretty much like the above, only that it is automatic...
i.e. %buildroot is a global macro that's already set, and
it's automatically cleaned before %install and in %clean.
(also implies that any BuildRoot: tag is simply ignored)

One less thing to worry about, unless using a pre-populated
buildroot. Then it's one more thing to worry about, instead.

--anders
Received on Mon Dec 22 17:35:24 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.