From 9ec8feda05ca2fd979eba771d8f0d26b725ad6f4 Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Mon, 17 Oct 2016 07:30:03 +0000 Subject: [PATCH] [4.0] Remove Profile Build Dependency (TV) 1. This is for Tizen 4.0. 2. When maintainers submit SR, they need to submit JIRA-TRE issues of the followings: - Add vc-engine-default-profile_common for common profile if common has vc-engine-default - Add vc-engine-default-profile_mobile for mobile profile if mobile has vc-engine-default - Add vc-engine-default-profile_wearable for wearable profile if wearable has vc-engine-default - Add vc-engine-default-profile_ivi for ivi profile if ivi has vc-engine-default - Add vc-engine-default-profile_tv for tv profile if tv has vc-engine-default Note that you should NOT remove vc-engine-default from the current meta when you add these vc-engine-default-profile_* 3. Please do not add more usage of profile. We are removing them now. (in 4.0) Change-Id: Id996c3c4fc2f2884e285ff969d3656ffb259ca00 Signed-off-by: MyungJoo Ham --- CMakeLists.txt | 12 +++---- packaging/vc-engine-default.spec | 76 ++++++++++++++++++++++++++++------------ 2 files changed, 60 insertions(+), 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ea8fad..2c9fb08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,11 +17,12 @@ ELSEIF("${ARCH}" MATCHES "^x86_64.*") SET(INSTALL_ARCH x86_64) ENDIF() -IF("${CMAKE_PROFILE}" STREQUAL "TV") -INSTALL(FILES ${CMAKE_SOURCE_DIR}/lib_embedded/${INSTALL_ARCH}/libvc-engine-default.so DESTINATION ${TZ_SYS_RO_SHARE}/voice/vc/1.0/engine/ COMPONENT RuntimeLibraries) -INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/engine_data_embedded/ DESTINATION ${TZ_SYS_RO_SHARE}/voice/vc/engine_data) -INSTALL(FILES ${CMAKE_SOURCE_DIR}/vc-default-info-embedded.xml DESTINATION ${TZ_SYS_RO_SHARE}/voice/vc/1.0/engine-info/ RENAME vc-default-info.xml) -ELSE() +# FLORA LICENSED (TV) FILES +INSTALL(FILES ${CMAKE_SOURCE_DIR}/lib_embedded/${INSTALL_ARCH}/libvc-engine-default.so DESTINATION ${TZ_SYS_RO_SHARE}/voice/vc/1.0/engine/flora/ COMPONENT RuntimeLibraries) +INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/engine_data_embedded/ DESTINATION ${TZ_SYS_RO_SHARE}/voice/vc/engine_data/flora/) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/vc-default-info-embedded.xml DESTINATION ${TZ_SYS_RO_SHARE}/voice/vc/1.0/engine-info/flora/ RENAME vc-default-info.xml) + +# PROPRIETARY (non-TV) FILES INSTALL(FILES ${CMAKE_SOURCE_DIR}/lib/${INSTALL_ARCH}/libasr-nlu.so DESTINATION ${LIBDIR}) INSTALL(FILES ${CMAKE_SOURCE_DIR}/lib/${INSTALL_ARCH}/libsvoiceclientdp.so DESTINATION ${LIBDIR}) INSTALL(FILES ${CMAKE_SOURCE_DIR}/lib/${INSTALL_ARCH}/libsvoiceparser.so DESTINATION ${LIBDIR}) @@ -31,4 +32,3 @@ INSTALL(FILES ${CMAKE_SOURCE_DIR}/lib/${INSTALL_ARCH}/libvoice-transport.so DEST INSTALL(FILES ${CMAKE_SOURCE_DIR}/lib/${INSTALL_ARCH}/libsvoice.so DESTINATION ${TZ_SYS_RO_SHARE}/voice/vc/1.0/engine/ COMPONENT RuntimeLibraries) INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/engine_data/shared DESTINATION ${TZ_SYS_RO_SHARE}/voice/vc/1.0/engine-data/n66) INSTALL(FILES ${CMAKE_SOURCE_DIR}/vc-default-info.xml DESTINATION ${TZ_SYS_RO_SHARE}/voice/vc/1.0/engine-info/) -ENDIF() diff --git a/packaging/vc-engine-default.spec b/packaging/vc-engine-default.spec index 6ecfb9a..3618b15 100644 --- a/packaging/vc-engine-default.spec +++ b/packaging/vc-engine-default.spec @@ -1,30 +1,44 @@ Name: vc-engine-default Summary: Voice control default engine library -Version: 0.2.0 +Version: 0.2.1 Release: 1 Group: Graphics & UI Framework/Voice Framework -%if "%{?profile}" == "tv" -License: Flora-1.1 -%else -License: Samsung proprietary -%endif +License: Samsung proprietary or Flora-1.1 Source0: %{name}-%{version}.tar.gz Source1001: %{name}.manifest BuildRequires: cmake BuildRequires: pkgconfig(libtzplatform-config) +Requires: %{name}-compat +Recommends: %{name}-profile_common %description Description: Voice control default engine library +%package profile_tv +Summary: vc-engine-default flora +License: Flora-1.1 +Provides: %{name}-compat = %{version}-%{release} +Conflicts: %{name}-profile_common + +%description profile_tv +vc-enging-default binaries with Flora 1.1 license. + +%package profile_common +Summary: vc-engine-default proprietary +License: Samsung proprietary +Provides: %{name}-compat = %{version}-%{release} +Provides: %{name}-profile_mobile = %{version}-%{release} +Provides: %{name}-profile_wearable = %{version}-%{release} +Provides: %{name}-profile_ivi = %{version}-%{release} +Conflicts: %{name}-profile_tv + +%description profile_common +vc-enging-default binaries with priorietary license. + %prep %setup -q cp %{SOURCE1001} . - -%if "%{?profile}" == "tv" -cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIBDIR=%{_libdir} -DTZ_SYS_RO_SHARE=%TZ_SYS_RO_SHARE -DCMAKE_PROFILE=TV -%else cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIBDIR=%{_libdir} -DTZ_SYS_RO_SHARE=%TZ_SYS_RO_SHARE -%endif %build make %{?jobs:-j%jobs} @@ -33,26 +47,44 @@ make %{?jobs:-j%jobs} rm -rf %{buildroot} %make_install mkdir -p %{buildroot}%{TZ_SYS_RO_SHARE}/license -%if "%{?profile}" == "tv" -cp %{_builddir}/%{name}-%{version}/LICENSE_embedded %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name} -%else -cp %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name} -%endif + +cp %{_builddir}/%{name}-%{version}/LICENSE_embedded %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name}-profile_tv +cp %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name}-profile_common + +%post profile_tv +echo "Moving files to destination..." +mv -f %{TZ_SYS_RO_SHARE}/voice/vc/1.0/engine/flora/lib*.so %{TZ_SYS_RO_SHARE}/voice/vc/1.0/engine/ +mv -f %{TZ_SYS_RO_SHARE}/voice/vc/1.0/engine-info/flora/vc-default-info.xml %{TZ_SYS_RO_SHARE}/voice/vc/1.0/engine-info/ +mv -f %{TZ_SYS_RO_SHARE}/voice/vc/engine_data/flora/* %{TZ_SYS_RO_SHARE}/voice/vc/engine_data/ +rm -rf %{TZ_SYS_RO_SHARE}/voice/vc/engine_data/flora + +%preun profile_tv +echo "Moving files for rpm uninstall..." +mv -f %{TZ_SYS_RO_SHARE}/voice/vc/1.0/engine/lib*.so %{TZ_SYS_RO_SHARE}/voice/vc/1.0/engine/flora/ +mv %{TZ_SYS_RO_SHARE}/voice/vc/1.0/engine-info/vc-default-info.xml %{TZ_SYS_RO_SHARE}/voice/vc/1.0/engine-info/flora/ +mkdir -p %{TZ_SYS_RO_SHARE}/voice/vc/tmp +mv -f %{TZ_SYS_RO_SHARE}/voice/vc/engine_data/* %{TZ_SYS_RO_SHARE}/voice/vc/tmp +mv -f %{TZ_SYS_RO_SHARE}/voice/vc/tmp %{TZ_SYS_RO_SHARE}/voice/vc/engine_data/flora %files + +%files profile_tv +%manifest vc-engine-default.manifest +%defattr(-,root,root,-) +%{TZ_SYS_RO_SHARE}/voice/vc/1.0/engine/flora/lib*.so +%{TZ_SYS_RO_SHARE}/voice/vc/1.0/engine-info/flora/vc-default-info.xml +%{TZ_SYS_RO_SHARE}/voice/vc/engine_data/flora/* +%{TZ_SYS_RO_SHARE}/license/%{name}-profile_tv + +%files profile_common %manifest vc-engine-default.manifest %defattr(-,root,root,-) %{TZ_SYS_RO_SHARE}/voice/vc/1.0/engine/lib*.so %{TZ_SYS_RO_SHARE}/voice/vc/1.0/engine-info/vc-default-info.xml -%{TZ_SYS_RO_SHARE}/license/%{name} -%if "%{?profile}" != "tv" %{TZ_SYS_RO_SHARE}/voice/vc/1.0/engine-data/* +%{TZ_SYS_RO_SHARE}/license/%{name}-profile_common %{_libdir}/libasr-nlu.so %{_libdir}/libsvoiceclientdp.so %{_libdir}/libsvoiceparser.so %{_libdir}/libvoiceactivity.so %{_libdir}/libvoice-transport.so -%endif -%if "%{?profile}" == "tv" -%{TZ_SYS_RO_SHARE}/voice/vc/engine_data/* -%endif -- 2.7.4