Dist/Tizen: Use meson and its commands to build and install the targets
authorWook Song <wook16.song@samsung.com>
Thu, 1 Feb 2024 01:59:14 +0000 (10:59 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Thu, 1 Feb 2024 04:52:37 +0000 (13:52 +0900)
This patch replaces the lines directly using ninja in the build and
install sections with the meson's compile and install commands.

Signed-off-by: Wook Song <wook16.song@samsung.com>
packaging/machine-learning-agent.spec

index f0878dbb9e7e3328b38c3f21f8287b07aea92ce9..b2f7f5ea503c4353de83a02b0d428db3f0881044 100644 (file)
@@ -174,13 +174,13 @@ CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-Wp,-D_FORTIFY_SOURCE=[1-9]||g"`
 %endif # unit_test
 
 rm -rf %{builddir}
-meson --buildtype=plain --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} --libdir=%{_libdir} \
+meson setup --buildtype=plain --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} --libdir=%{_libdir} \
        --bindir=%{_bindir} --includedir=%{_includedir} \
        %{enable_test} %{install_test} %{enable_test_coverage} %{enable_gcov} \
        %{enable_tizen} %{service_db_path} %{service_db_key_prefix} \
        %{builddir}
 
-ninja -C build %{?_smp_mflags}
+meson compile -C %{builddir} %{?_smp_mflags}
 
 export MLAGENT_SOURCE_ROOT_PATH=$(pwd)
 export MLAGENT_BUILD_ROOT_PATH=$(pwd)/%{builddir}
@@ -194,7 +194,7 @@ bash %{test_script} ./tests/daemon/unittest_gdbus_util
 %endif # unit_test
 
 %install
-DESTDIR=%{buildroot} ninja -C %{builddir} %{?_smp_mflags} install
+meson install -C %{builddir} --destdir=%{buildroot}
 
 %if 0%{?unit_test}
 %if 0%{?testcoverage}