Merge pull request #875 from mesonbuild/ignatenko/macro
rpm: couple of improvements and fixespull/886/head
commit
3461e258f0
2 changed files with 40 additions and 35 deletions
@ -1,21 +1,34 @@ |
||||
%__meson /usr/bin/meson |
||||
%__meson %{_bindir}/meson |
||||
%__sourcedir . |
||||
%__builddir %{_target_platform} |
||||
|
||||
%meson() %{expand:\ |
||||
export CFLAGS="%{optflags}" ; \ |
||||
export CXXFLAGS="%{optflags}" ; \ |
||||
export FFLAGS="%{optflags} -I%{_fmoddir}" ; \ |
||||
export FCFLAGS="%{optflags} -I%{_fmoddir}" ; \ |
||||
export LDFLAGS="%{__global_ldflags}" ; \ |
||||
%__meson %{?1} \\\ |
||||
--prefix=%{_prefix} \\\ |
||||
--libdir=%{_libdir} \\\ |
||||
--libexecdir=%{_libexecdir} \\\ |
||||
--bindir=%{_bindir} \\\ |
||||
--includedir=%{_includedir} \\\ |
||||
--datadir=%{_datadir} \\\ |
||||
--mandir=%{_mandir} \\\ |
||||
--localedir=%{_datadir}/locale \\\ |
||||
--sysconfdir=%{_sysconfdir} \\\ |
||||
--buildtype=plain \ |
||||
%{nil} \ |
||||
} |
||||
%meson \ |
||||
export CFLAGS="%{optflags}" \ |
||||
export CXXFLAGS="%{optflags}" \ |
||||
export FFLAGS="%{optflags} -I%{_fmoddir}" \ |
||||
export FCFLAGS="%{optflags} -I%{_fmoddir}" \ |
||||
export LDFLAGS="%{?__global_ldflags}" \ |
||||
mkdir -p %{__builddir} \ |
||||
pushd %{__builddir} \ |
||||
%{__meson} \\\ |
||||
--buildtype=plain \\\ |
||||
--prefix=%{_prefix} \\\ |
||||
--libdir=%{_libdir} \\\ |
||||
--libexecdir=%{_libexecdir} \\\ |
||||
--bindir=%{_bindir} \\\ |
||||
--includedir=%{_includedir} \\\ |
||||
--datadir=%{_datadir} \\\ |
||||
--mandir=%{_mandir} \\\ |
||||
--localedir=%{_datadir}/locale \\\ |
||||
--sysconfdir=%{_sysconfdir} \\\ |
||||
$OLDPWD/%{__sourcedir} \ |
||||
popd |
||||
|
||||
%meson_build \ |
||||
%ninja_build -C %{__builddir} |
||||
|
||||
%meson_install \ |
||||
%ninja_install -C %{__builddir} |
||||
|
||||
%meson_test \ |
||||
%ninja_test -C %{__builddir} |
||||
|
Loading…
Reference in new issue