Revert "Change to embedded engine as default"
[platform/core/uifw/stt-engine-embedded.git] / packaging / org.tizen.stt-engine-embedded.spec
1 %define _optdir /opt
2 %define _appdir %{_optdir}/apps
3
4 Name:       org.tizen.stt-engine-embedded
5 Summary:    Samsung Tizen Embedded Speech To Text engine (On-Device ASR)
6 Version:    1.0.0
7 Release:    1
8 Group:      Graphics & UI Framework/Voice Framework
9 License:    Flora-1.1 and BSD-3-Clause and Apache-2.0 and MPL-2.0
10 Source0:    %{name}-%{version}.tar.gz
11 Source1001: %{name}.manifest
12
13 Requires(post): /sbin/ldconfig
14 Requires(postun): /sbin/ldconfig
15
16 BuildRequires: cmake
17 BuildRequires: pkgconfig(libtzplatform-config)
18
19 %description
20 Description: Samsung Tizen Embedded Speech To Text engine
21
22 ####
23 #  Preparation
24 ####
25 %prep
26 %setup -q
27 cp %{SOURCE1001} .
28
29 cat LICENSE LICENSE.APLv2 LICENSE.BSD LICENSE.MPLv2 > LICENSE.merge
30 cp LICENSE.merge LICENSE
31 rm LICENSE.merge
32
33 %define APP_PREFIX      %{TZ_SYS_RO_APP}/%{name}
34 export LD_LIBRARY_PATH=%{APP_PREFIX}/lib
35
36 %define MANIFESTDIR     %{TZ_SYS_RO_PACKAGES}
37
38 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIBDIR=%{_libdir} \
39       -DCMAKE_INSTALL_PREFIX=/usr \
40       -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
41       -DTZ_SYS_RO_SHARE=%TZ_SYS_RO_SHARE \
42           -DAPP_INSTALL_PREFIX=%{APP_PREFIX} \
43           -DAPP_MANIFESTDIR=%{MANIFESTDIR}
44
45 ####
46 #  Build
47 ####
48 %build
49 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
50 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
51 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
52 make %{?jobs:-j%jobs}
53
54 ####
55 #  Installation
56 ####
57 %install
58 rm -rf %{buildroot}
59
60 %make_install
61
62 ####
63 #  Post Install
64 ####
65 %post
66 /sbin/ldconfig
67 exit 0
68
69 ####
70 #  Post Uninstall
71 ####
72 %postun
73 /sbin/ldconfig
74 exit 0
75
76 ####
77 #  Files in Binary Packages
78 ####
79 %files
80 %license LICENSE
81 %manifest %{name}.manifest
82 %defattr(-,root,root,-)
83 #%{_libdir}/*.so*
84 #%{TZ_SYS_RO_SHARE}/voice/stt/1.0/engine/*.so
85 %{APP_PREFIX}/bin/*
86 %{APP_PREFIX}/lib/*
87 %{MANIFESTDIR}/org.tizen.stt-engine-embedded.xml
88 %{APP_PREFIX}/shared/res/*
89 #/opt/usr/home/owner/share/.voice/stt/1.0/engine-rsc/org.tizen.stt-engine-embedded/configs.txt
90 #/opt/usr/home/owner/share/.voice/stt/1.0/engine-rsc/org.tizen.stt-engine-embedded/config
91 ##/opt/usr/home/owner/share/.voice/stt/1.0/engine-rsc/org.tizen.stt-engine-embedded/lib/*.so
92 #/opt/usr/home/owner/share/.voice/stt/1.0/engine-rsc/org.tizen.stt-engine-embedded/model/am/*
93 #/opt/usr/home/owner/share/.voice/stt/1.0/engine-rsc/org.tizen.stt-engine-embedded/model/conf/*
94 #/opt/usr/home/owner/share/.voice/stt/1.0/engine-rsc/org.tizen.stt-engine-embedded/model/lm/*
95 %attr(644,root,root) /etc/profile.d/ondeviceasr.sh