Staging DOs & DON'Ts

Scot Hetzel swhetzel at gmail.com
Mon Nov 4 01:13:54 UTC 2013


On Thu, Oct 31, 2013 at 10:37 AM, Peter Pentchev <roam at ringlet.net> wrote:
> On Thu, Oct 31, 2013 at 10:30:03AM +0200, Kimmo Paasiala wrote:
>> Could we have this as an example what not to in the Makefile. It is
>> from the latest change to the Makefile of sysutils/kiconvtool.
>>
>>
>> MAKE_ARGS=     PREFIX="${STAGEDIR}${PREFIX}"
>>
>> This breaks stuff that edits scripts in place trying to replace paths
>> that depend on the value of PREFIX.
>
> The proper way to do this - and the way it's done on other OSs and other
> packaging systems that have the staging directory feature - is to:
>
> 1. Pass ${STAGEDIR} as a separate build option to the actual build;
>    it's traditional to pass it as the DESTDIR option:
>
>    MAKE_ARGS+=  DESTDIR="${STAGEDIR}"
>
There is no need add this to the ports Makefile, as stage already does
this for you in bsd.stage.mk.


More information about the freebsd-ports mailing list