Meson: [RFE] add --destdir option

Created on 24 Feb 2015  路  4Comments  路  Source: mesonbuild/meson

when we're packaging software we want to install it to %{buildroot}/%{_prefix}/.... and we can't set prefix to %{buildroot}/%{_prefix}/, because it can break auto-config files and etc.

P.S. %{buildroot} in RPM == $(DESTDIR) in automake

Most helpful comment

Meson already supports DESTDIR and it works exactly the same as with CMake and Autotools. Just do this:

DESTDIR=/your/staging/area ninja install

The installer for Meson itself takes a --destdir argument. I should probably make it behave the same.

All 4 comments

Meson already supports DESTDIR and it works exactly the same as with CMake and Autotools. Just do this:

DESTDIR=/your/staging/area ninja install

The installer for Meson itself takes a --destdir argument. I should probably make it behave the same.

So in your case roughly the following:

meson --prefix=%{_prefix}
ninja
ninja test
DESTDIR=%{buildroot} ninja install

really, it works. Thanks!

can you add this to documentation?

Fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amitdo picture amitdo  路  6Comments

keszybz picture keszybz  路  3Comments

Ericson2314 picture Ericson2314  路  4Comments

SilverRainZ picture SilverRainZ  路  5Comments

sarum9in picture sarum9in  路  3Comments