From 6b6c72613a74a1762487fdb668d0ac9afcc8e392 Mon Sep 17 00:00:00 2001 From: Wook Song Date: Thu, 12 Oct 2023 13:12:45 +0900 Subject: [PATCH] MLAgent: Change the name of ML-Agent This patch changes the name of ML-Agent from ml-agentd to ml-agent. Signed-off-by: Wook Song --- c/src/meson.build | 10 +-- daemon/include/meson.build | 2 +- daemon/meson.build | 80 +++++++++++----------- daemon/{ml-agentd.pc.in => ml-agent.pc.in} | 4 +- packaging/machine-learning-api.spec | 14 ++-- tests/capi/meson.build | 4 +- tests/daemon/meson.build | 14 ++-- tests/meson.build | 6 +- 8 files changed, 67 insertions(+), 67 deletions(-) rename daemon/{ml-agentd.pc.in => ml-agent.pc.in} (79%) diff --git a/c/src/meson.build b/c/src/meson.build index 288c2d93..62746ee0 100644 --- a/c/src/meson.build +++ b/c/src/meson.build @@ -102,7 +102,7 @@ nns_capi_dep = declare_dependency(link_with: nns_capi_lib, # Service API if get_option('enable-ml-service') - ml_service_deps = [nns_capi_dep, ml_agentd_deps] + ml_service_deps = [nns_capi_dep, ml_agent_deps] if support_remote_service ml_service_deps += [nnstreamer_edge_dep, curl_dep] endif @@ -110,19 +110,19 @@ if get_option('enable-ml-service') nns_capi_service_shared_lib = shared_library ('capi-ml-service', nns_capi_service_srcs, dependencies: ml_service_deps, - include_directories: [nns_capi_include, ml_agentd_incs], + include_directories: [nns_capi_include, ml_agent_incs], install: true, install_dir: api_install_libdir, - link_with: ml_agentd_lib, + link_with: ml_agent_lib, version: api_version, ) nns_capi_service_static_lib = static_library ('capi-ml-service', nns_capi_service_srcs, dependencies: ml_service_deps, - include_directories: [nns_capi_include, ml_agentd_incs], + include_directories: [nns_capi_include, ml_agent_incs], install: true, - link_with: ml_agentd_lib, + link_with: ml_agent_lib, install_dir: api_install_libdir, ) diff --git a/daemon/include/meson.build b/daemon/include/meson.build index d467e103..11fb25a4 100644 --- a/daemon/include/meson.build +++ b/daemon/include/meson.build @@ -1 +1 @@ -ml_agentd_headers = files('ml-agent-interface.h') +ml_agent_headers = files('ml-agent-interface.h') diff --git a/daemon/meson.build b/daemon/meson.build index f4adbc08..9e11e254 100644 --- a/daemon/meson.build +++ b/daemon/meson.build @@ -1,12 +1,12 @@ # Machine Learning Agent # This file should be included when ml-service feature is enabled. -ml_agentd_incs = include_directories('.', 'include') -ml_agentd_lib_common_srcs = files('modules.c', 'gdbus-util.c', 'ml-agent-interface.c', +ml_agent_incs = include_directories('.', 'include') +ml_agent_lib_common_srcs = files('modules.c', 'gdbus-util.c', 'ml-agent-interface.c', 'pipeline-dbus-impl.cc', 'model-dbus-impl.cc', 'resource-dbus-impl.cc') -ml_agentd_lib_service_db_srcs = files('service-db.cc') +ml_agent_lib_service_db_srcs = files('service-db.cc') if (get_option('enable-tizen')) - ml_agentd_lib_common_srcs += files('pkg-mgr.cc') + ml_agent_lib_common_srcs += files('pkg-mgr.cc') endif # Generate GDbus header and code @@ -38,7 +38,7 @@ gdbus_gen_resource_src = custom_target('gdbus-resource-gencode', gdbus_gen_header_dep = declare_dependency( sources: [gdbus_gen_pipeline_src, gdbus_gen_model_src, gdbus_gen_resource_src]) -ml_agentd_deps = [ +ml_agent_deps = [ gdbus_gen_header_dep, glib_dep, gio_dep, @@ -49,7 +49,7 @@ ml_agentd_deps = [ ] if (get_option('enable-tizen')) - ml_agentd_deps += [ + ml_agent_deps += [ dependency('capi-appfw-app-common'), dependency('capi-appfw-package-manager'), dependency('dlog') @@ -62,66 +62,66 @@ daemon_cpp_db_path_arg = '-DDB_PATH="' + serviceDBPath + '"' serviceDBKeyPrefix = get_option('service-db-key-prefix') daemon_cpp_db_key_prefix_arg = '-DMESON_KEY_PREFIX="' + serviceDBKeyPrefix + '"' -ml_agentd_lib_srcs = [ml_agentd_lib_common_srcs, ml_agentd_lib_service_db_srcs] -ml_agentd_shared_lib = shared_library ('ml-agentd', - ml_agentd_lib_srcs, - dependencies: ml_agentd_deps, - include_directories: ml_agentd_incs, +ml_agent_lib_srcs = [ml_agent_lib_common_srcs, ml_agent_lib_service_db_srcs] +ml_agent_shared_lib = shared_library ('ml-agent', + ml_agent_lib_srcs, + dependencies: ml_agent_deps, + include_directories: ml_agent_incs, install: true, install_dir: api_install_libdir, cpp_args: [daemon_cpp_db_path_arg, daemon_cpp_db_key_prefix_arg], version: api_version, ) -ml_agentd_static_lib = static_library('ml-agentd', - ml_agentd_lib_srcs, - dependencies: ml_agentd_deps, - include_directories: ml_agentd_incs, +ml_agent_static_lib = static_library('ml-agent', + ml_agent_lib_srcs, + dependencies: ml_agent_deps, + include_directories: ml_agent_incs, install: true, install_dir: api_install_libdir, cpp_args: [daemon_cpp_db_path_arg, daemon_cpp_db_key_prefix_arg], pic: true, ) -ml_agentd_lib = ml_agentd_shared_lib +ml_agent_lib = ml_agent_shared_lib if get_option('default_library') == 'static' - ml_agentd_lib = ml_agentd_static_lib + ml_agent_lib = ml_agent_static_lib endif -ml_agentd_lib_common_objs = ml_agentd_shared_lib.extract_objects(ml_agentd_lib_common_srcs) -ml_agentd_test_both_lib = both_libraries('ml-agentd-test', - ml_agentd_lib_service_db_srcs, - dependencies: ml_agentd_deps, - include_directories: ml_agentd_incs, +ml_agent_lib_common_objs = ml_agent_shared_lib.extract_objects(ml_agent_lib_common_srcs) +ml_agent_test_both_lib = both_libraries('ml-agent-test', + ml_agent_lib_service_db_srcs, + dependencies: ml_agent_deps, + include_directories: ml_agent_incs, install: get_option('install-test'), install_dir: api_install_libdir, cpp_args: ['-DDB_PATH="."', daemon_cpp_db_key_prefix_arg], - objects: ml_agentd_lib_common_objs, + objects: ml_agent_lib_common_objs, version: api_version, pic: true, ) -ml_agentd_test_lib = ml_agentd_test_both_lib.get_shared_lib() +ml_agent_test_lib = ml_agent_test_both_lib.get_shared_lib() if get_option('default_library') == 'static' - ml_agentd_test_lib = ml_agentd_test_both_lib.get_static_lib() + ml_agent_test_lib = ml_agent_test_both_lib.get_static_lib() endif -lib_ml_agentd_test_dep = declare_dependency( - dependencies: ml_agentd_deps, - include_directories: ml_agentd_incs, - link_with: ml_agentd_test_lib, +lib_ml_agent_test_dep = declare_dependency( + dependencies: ml_agent_deps, + include_directories: ml_agent_incs, + link_with: ml_agent_test_lib, ) subdir('include') -install_headers(ml_agentd_headers, - subdir: 'ml-agentd' +install_headers(ml_agent_headers, + subdir: 'ml-agent' ) -ml_agentd_main_file = files('main.c') +ml_agent_main_file = files('main.c') ml_agent_executable = executable('machine-learning-agent', - ml_agentd_main_file, - link_with: ml_agentd_lib, - dependencies: ml_agentd_deps, - include_directories: ml_agentd_incs, + ml_agent_main_file, + link_with: ml_agent_lib, + dependencies: ml_agent_deps, + include_directories: ml_agent_incs, install: true, install_dir: api_install_bindir, pie: true @@ -151,9 +151,9 @@ configure_file(input: '../dbus/machine-learning-agent.service.in', configuration: systemd_conf ) -ml_agentd_conf = configuration_data() -ml_agentd_conf.merge_from(api_conf) -configure_file(input: 'ml-agentd.pc.in', output: 'ml-agentd.pc', +ml_agent_conf = configuration_data() +ml_agent_conf.merge_from(api_conf) +configure_file(input: 'ml-agent.pc.in', output: 'ml-agent.pc', install_dir: join_paths(api_install_libdir, 'pkgconfig'), - configuration: ml_agentd_conf + configuration: ml_agent_conf ) diff --git a/daemon/ml-agentd.pc.in b/daemon/ml-agent.pc.in similarity index 79% rename from daemon/ml-agentd.pc.in rename to daemon/ml-agent.pc.in index ca659f8b..f273253f 100644 --- a/daemon/ml-agentd.pc.in +++ b/daemon/ml-agent.pc.in @@ -6,5 +6,5 @@ includedir=@INCLUDE_INSTALL_DIR@ Name: ml-agent-service Description: Development headers and libraries for interfaces provided by Machine Learning Agent Service Version: @VERSION@ -Libs: -L${libdir} -lml-agentd -Cflags: -I${includedir}/ml-agentd +Libs: -L${libdir} -lml-agent +Cflags: -I${includedir}/ml-agent diff --git a/packaging/machine-learning-api.spec b/packaging/machine-learning-api.spec index bb23542f..e7229ca2 100644 --- a/packaging/machine-learning-api.spec +++ b/packaging/machine-learning-api.spec @@ -510,14 +510,14 @@ install -m 0755 packaging/run-unittest.sh %{buildroot}%{_bindir}/tizen-unittests %if 0%{?enable_ml_service} %files -n libmachine-learning-agent %manifest machine-learning-agent.manifest -%{_libdir}/libml-agentd.so.* +%{_libdir}/libml-agent.so.* %files -n libmachine-learning-agent-devel %manifest machine-learning-agent.manifest -%{_libdir}/libml-agentd.so -%{_libdir}/libml-agentd.a -%{_includedir}/ml-agentd/ml-agent-interface.h -%{_libdir}/pkgconfig/ml-agentd.pc +%{_libdir}/libml-agent.so +%{_libdir}/libml-agent.a +%{_includedir}/ml-agent/ml-agent-interface.h +%{_libdir}/pkgconfig/ml-agent.pc %files -n machine-learning-agent %manifest machine-learning-agent.manifest @@ -545,8 +545,8 @@ install -m 0755 packaging/run-unittest.sh %{buildroot}%{_bindir}/tizen-unittests %files -n capi-machine-learning-unittests %manifest capi-machine-learning.manifest %{_bindir}/unittest-ml -%{_libdir}/libml-agentd-test.a -%{_libdir}/libml-agentd-test.so* +%{_libdir}/libml-agent-test.a +%{_libdir}/libml-agent-test.so* %{_libdir}/libunittest_mock.so* %if 0%{?gcov:1} %{_bindir}/tizen-unittests/%{name}/run-unittest.sh diff --git a/tests/capi/meson.build b/tests/capi/meson.build index 74e07c3c..4df9451c 100644 --- a/tests/capi/meson.build +++ b/tests/capi/meson.build @@ -34,7 +34,7 @@ test('unittest_capi_datatype_consistency', unittest_capi_datatype_consistency, e if get_option('enable-ml-service') unittest_capi_service_agent_client = executable('unittest_capi_service_agent_client', 'unittest_capi_service_agent_client.cc', - dependencies: [unittest_common_dep, nns_capi_service_dep, gdbus_gen_test_dep, lib_ml_agentd_test_dep], + dependencies: [unittest_common_dep, nns_capi_service_dep, gdbus_gen_test_dep, lib_ml_agent_test_dep], install: get_option('install-test'), install_dir: unittest_install_dir, include_directories: nns_capi_include, @@ -44,7 +44,7 @@ if get_option('enable-ml-service') if support_remote_service unittest_capi_remote_service = executable('unittest_capi_remote_service', 'unittest_capi_remote_service.cc', - dependencies: [unittest_common_dep, nns_capi_service_dep, gdbus_gen_test_dep, lib_ml_agentd_test_dep], + dependencies: [unittest_common_dep, nns_capi_service_dep, gdbus_gen_test_dep, lib_ml_agent_test_dep], install: get_option('install-test'), install_dir: unittest_install_dir, include_directories: nns_capi_include, diff --git a/tests/daemon/meson.build b/tests/daemon/meson.build index 3e3fa4f1..2dd8ecbf 100644 --- a/tests/daemon/meson.build +++ b/tests/daemon/meson.build @@ -1,28 +1,28 @@ unittest_ml_agent = executable('unittest_ml_agent', 'unittest_ml_agent.cc', - dependencies: [unittest_common_dep, ml_agentd_deps, gdbus_gen_test_dep], + dependencies: [unittest_common_dep, ml_agent_deps, gdbus_gen_test_dep], install: get_option('install-test'), install_dir: unittest_install_dir, - include_directories: [nns_capi_include, ml_agentd_incs] + include_directories: [nns_capi_include, ml_agent_incs] ) test('unittest_ml_agent', unittest_ml_agent, env: testenv, timeout: 100) unittest_service_db = executable('unittest_service_db', 'unittest_service_db.cc', - link_with: ml_agentd_test_lib, - dependencies: [unittest_common_dep, ml_agentd_deps], + link_with: ml_agent_test_lib, + dependencies: [unittest_common_dep, ml_agent_deps], install: get_option('install-test'), install_dir: unittest_install_dir, - include_directories: [nns_capi_include, ml_agentd_incs], + include_directories: [nns_capi_include, ml_agent_incs], ) test('unittest_service_db', unittest_service_db, env: testenv, timeout: 100) unittest_gdbus_util = executable('unittest_gdbus_util', 'unittest_gdbus_util.cc', dependencies: [unittest_common_dep], - link_with: ml_agentd_lib, + link_with: ml_agent_lib, install: get_option('install-test'), install_dir: unittest_install_dir, - include_directories: [ml_agentd_incs], + include_directories: [ml_agent_incs], ) test('unittest_gdbus_util', unittest_gdbus_util, env: testenv, timeout: 100) diff --git a/tests/meson.build b/tests/meson.build index 8884bad5..e92e12ad 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -24,14 +24,14 @@ if get_option('enable-ml-service') subdir('mock') subdir('dbus') - ml_agentd_main_objs = ml_agent_executable.extract_objects(ml_agentd_main_file) + ml_agent_main_objs = ml_agent_executable.extract_objects(ml_agent_main_file) executable('machine-learning-agent-test', test_dbus_impl_srcs, - dependencies: [lib_ml_agentd_test_dep, gdbus_gen_test_dep], + dependencies: [lib_ml_agent_test_dep, gdbus_gen_test_dep], install: get_option('install-test'), install_dir: unittest_base_dir, link_with: lib_unittest_mock, - objects: ml_agentd_main_objs, + objects: ml_agent_main_objs, ) subdir('services')