2016-10-08 22:54:03 +08:00
|
|
|
%__meson %{_bindir}/meson
|
2017-04-23 19:30:29 +08:00
|
|
|
%__meson_wrap_mode nodownload
|
2018-07-24 01:24:33 +08:00
|
|
|
%__meson_auto_features enabled
|
2015-03-21 19:42:55 +08:00
|
|
|
|
2019-04-23 20:31:38 +08:00
|
|
|
%_smp_mesonflags %([ -z "$MESON_BUILD_NCPUS" ] \\\
|
|
|
|
&& MESON_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
|
|
|
|
ncpus_max=%{?_smp_ncpus_max}; \\\
|
|
|
|
if [ -n "$ncpus_max" ] && [ "$ncpus_max" -gt 0 ] && [ "$MESON_BUILD_NCPUS" -gt "$ncpus_max" ]; then MESON_BUILD_NCPUS="$ncpus_max"; fi; \\\
|
|
|
|
if [ "$MESON_BUILD_NCPUS" -gt 1 ]; then echo "--num-processes $MESON_BUILD_NCPUS"; fi)
|
|
|
|
|
2016-10-08 22:54:03 +08:00
|
|
|
%meson \
|
2018-07-24 01:25:30 +08:00
|
|
|
%set_build_flags \
|
2018-07-24 01:29:19 +08:00
|
|
|
%{shrink:%{__meson} \
|
|
|
|
--buildtype=plain \
|
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--libdir=%{_libdir} \
|
|
|
|
--libexecdir=%{_libexecdir} \
|
|
|
|
--bindir=%{_bindir} \
|
|
|
|
--sbindir=%{_sbindir} \
|
|
|
|
--includedir=%{_includedir} \
|
|
|
|
--datadir=%{_datadir} \
|
|
|
|
--mandir=%{_mandir} \
|
|
|
|
--infodir=%{_infodir} \
|
|
|
|
--localedir=%{_datadir}/locale \
|
|
|
|
--sysconfdir=%{_sysconfdir} \
|
|
|
|
--localstatedir=%{_localstatedir} \
|
|
|
|
--sharedstatedir=%{_sharedstatedir} \
|
|
|
|
--wrap-mode=%{__meson_wrap_mode} \
|
2018-07-24 01:24:33 +08:00
|
|
|
--auto-features=%{__meson_auto_features} \
|
2018-07-24 01:29:19 +08:00
|
|
|
%{_vpath_srcdir} %{_vpath_builddir} \
|
|
|
|
%{nil}}
|
2016-10-08 23:15:02 +08:00
|
|
|
|
|
|
|
%meson_build \
|
2016-12-14 02:20:03 +08:00
|
|
|
%ninja_build -C %{_vpath_builddir}
|
2016-10-08 23:15:02 +08:00
|
|
|
|
|
|
|
%meson_install \
|
2016-12-14 02:20:03 +08:00
|
|
|
%ninja_install -C %{_vpath_builddir}
|
2016-10-08 23:15:02 +08:00
|
|
|
|
|
|
|
%meson_test \
|
2019-04-23 20:31:38 +08:00
|
|
|
%{shrink: %{__meson} test \
|
|
|
|
-C %{_vpath_builddir} \
|
|
|
|
%{?_smp_mesonflags} \
|
|
|
|
--print-errorlogs \
|
|
|
|
%{nil}}
|