From 681b884c6a50f3134065311d1610991dcdde916e Mon Sep 17 00:00:00 2001 From: gichan2-jang Date: Fri, 11 Oct 2024 13:44:05 +0900 Subject: [ml-service] Add staging header to prevent build error Staging header will be added to Tizen 7.0. Add empty staging header file to prevent build errors for users using the header file. Signed-off-by: gichan2-jang --- c/include/meson.build | 3 +++ c/include/ml-api-staging.h | 32 ++++++++++++++++++++++++++++++++ packaging/machine-learning-api.spec | 10 ++++++++++ 3 files changed, 45 insertions(+) create mode 100644 c/include/ml-api-staging.h diff --git a/c/include/meson.build b/c/include/meson.build index 4a5f5af..7dd8c0b 100644 --- a/c/include/meson.build +++ b/c/include/meson.build @@ -7,3 +7,6 @@ else endif nns_capi_service_headers = files('ml-api-service.h') +if get_option('enable-tizen') + nns_capi_service_headers += files('ml-api-staging.h') +endif diff --git a/c/include/ml-api-staging.h b/c/include/ml-api-staging.h new file mode 100644 index 0000000..0312567 --- /dev/null +++ b/c/include/ml-api-staging.h @@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/** + * NNStreamer API / Tizen Machine-Learning API Internal Header + * Copyright (C) 2024 Gichan Jang + */ +/** + * @file ml-api-staging.h + * @date 10 oct 2024 + * @brief Internal header for ML-API. + * @see https://github.com/nnstreamer/nnstreamer + * @author Gichan Jang + * @bug No known bugs except for NYI items + */ + +#ifndef __ML_API_STAGING_H__ +#define __ML_API_STAGING_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/** + * Temporarily use the API waiting for release. + */ + +#ifdef __cplusplus +} +#endif /* __cplusplus */ +#endif /* __ML_API_STAGING_H__ */ diff --git a/packaging/machine-learning-api.spec b/packaging/machine-learning-api.spec index 4078bda..d473da3 100644 --- a/packaging/machine-learning-api.spec +++ b/packaging/machine-learning-api.spec @@ -298,6 +298,13 @@ Group: Machine Learning/ML Framework Requires: capi-machine-learning-service = %{version}-%{release} %description -n capi-machine-learning-service-devel-static Static library of Tizen Machine Learning Service API. + +%package -n capi-machine-learning-staging +Summary: Tizen staging headers for Tizen Machine Learning API +Group: Machine Learning/ML Framework +Requires: capi-machine-learning-service-devel = %{version}-%{release} +%description -n capi-machine-learning-staging +Tizen staging headers for Tizen Machine Learning API. %endif %if 0%{?unit_test} @@ -541,6 +548,9 @@ install -m 0755 packaging/run-unittest.sh %{buildroot}%{_bindir}/tizen-unittests %files -n capi-machine-learning-service-devel-static %{_libdir}/libcapi-ml-service.a + +%files -n capi-machine-learning-staging +%{_includedir}/nnstreamer/ml-api-staging.h %endif %if 0%{?unit_test} -- cgit v1.2.3