CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(vc-engine-default C)
+PROJECT(org.tizen.vc-engine-default C)
-SET(VERSION 0.2.0)
+SET(VERSION 1.0.1)
FIND_PROGRAM(UNAME NAMES uname)
EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
IF("${ARCH}" MATCHES "^arm.*")
SET(INSTALL_ARCH arm)
+INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/bin/arm/org.tizen.vc-engine-default DESTINATION ${APP_INSTALL_PREFIX}/bin/)
ELSEIF("${ARCH}" MATCHES "^i586.*")
SET(INSTALL_ARCH i586)
+INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/bin/i586/org.tizen.vc-engine-default DESTINATION ${APP_INSTALL_PREFIX}/bin/)
ELSEIF("${ARCH}" MATCHES "^i686.*")
SET(INSTALL_ARCH i586)
+INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/bin/i586/org.tizen.vc-engine-default DESTINATION ${APP_INSTALL_PREFIX}/bin/)
ELSEIF("${ARCH}" MATCHES "^aarch64.*")
SET(INSTALL_ARCH aarch64)
+INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/bin/aarch64/org.tizen.vc-engine-default DESTINATION ${APP_INSTALL_PREFIX}/bin/)
ELSEIF("${ARCH}" MATCHES "^x86_64.*")
SET(INSTALL_ARCH x86_64)
+INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/bin/x86_64/org.tizen.vc-engine-default DESTINATION ${APP_INSTALL_PREFIX}/bin/)
ENDIF()
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/lib/${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/ DESTINATION ${TZ_SYS_RO_SHARE}/voice/vc/engine_data)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/vc-default-info.xml DESTINATION ${TZ_SYS_RO_SHARE}/voice/vc/1.0/engine-info/)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.vc-engine-default.xml DESTINATION ${APP_MANIFESTDIR})
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="5.0" package="org.tizen.vc-engine-default" version="1.0.1">
+ <profile name="mobile"/>
+ <service-application appid="org.tizen.vc-engine-default" exec="org.tizen.vc-engine-default" multiple="false" nodisplay="true" taskmanage="false" type="capp">
+ <label>org.tizen.vc-engine-default</label>
+ <icon>vc-engine-default.png</icon>
+ <background-category value="media"/>
+ <background-category value="background-network"/>
+ </service-application>
+ <privileges>
+ <privilege>http://tizen.org/privilege/network.get</privilege>
+ <privilege>http://tizen.org/privilege/recorder</privilege>
+ </privileges>
+</manifest>
--- /dev/null
+Name: org.tizen.vc-engine-default
+Summary: Voice control default engine service app
+Version: 1.0.1
+Release: 1
+Group: Graphics & UI Framework/Voice Framework
+License: Flora-1.1
+Source0: %{name}-%{version}.tar.gz
+Source1001: %{name}.manifest
+BuildRequires: cmake
+BuildRequires: pkgconfig(libtzplatform-config)
+
+%description
+Description: Voice control default engine service app
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+
+%define APP_PREFIX %{TZ_SYS_RO_APP}/%{name}
+%define MANIFESTDIR %{TZ_SYS_RO_PACKAGES}
+
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIBDIR=%{_libdir} -DTZ_SYS_RO_SHARE=%TZ_SYS_RO_SHARE \
+ -DAPP_INSTALL_PREFIX=%{APP_PREFIX} -DAPP_MANIFESTDIR=%{MANIFESTDIR}
+
+%build
+export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
+export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
+export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+%post
+/sbin/ldconfig
+exit 0
+
+%postun
+/sbin/ldconfig
+exit 0
+
+%files
+%license LICENSE
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%{APP_PREFIX}/bin/*
+%{MANIFESTDIR}/org.tizen.vc-engine-default.xml
+#%{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}/voice/vc/engine_data/*
+++ /dev/null
-Name: vc-engine-default
-Summary: Voice control default engine library
-Version: 0.2.1
-Release: 1
-Group: Graphics & UI Framework/Voice Framework
-License: Flora-1.1
-Source0: %{name}-%{version}.tar.gz
-Source1001: %{name}.manifest
-BuildRequires: cmake
-BuildRequires: pkgconfig(libtzplatform-config)
-
-%description
-Description: Voice control default engine library
-
-%prep
-%setup -q
-cp %{SOURCE1001} .
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIBDIR=%{_libdir} -DTZ_SYS_RO_SHARE=%TZ_SYS_RO_SHARE
-
-%build
-make %{?jobs:-j%jobs}
-
-%install
-rm -rf %{buildroot}
-%make_install
-
-%files
-%license LICENSE
-%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}/voice/vc/engine_data/*
\ No newline at end of file