Update package version (1.60.0)
[platform/core/uifw/stt.git] / packaging / stt.spec
1 Name:       stt
2 Summary:    Speech To Text client library and daemon
3 Version:    1.60.0
4 Release:    1
5 Group:      Graphics & UI Framework/Voice Framework
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1001: %{name}.manifest
9 Source1002: %{name}-devel.manifest
10 Requires(post): /sbin/ldconfig
11 Requires(post): /usr/bin/buxton2ctl
12 Requires(postun): /sbin/ldconfig
13 Requires:  gawk
14 BuildRequires:  pkgconfig(aul)
15 BuildRequires:  pkgconfig(capi-appfw-app-manager)
16 BuildRequires:  pkgconfig(buxton2)
17 BuildRequires:  pkgconfig(capi-base-common)
18 BuildRequires:  pkgconfig(capi-media-audio-io)
19 BuildRequires:  pkgconfig(capi-media-wav-player)
20 BuildRequires:  pkgconfig(capi-system-info)
21 BuildRequires:  pkgconfig(cynara-client)
22 BuildRequires:  pkgconfig(cynara-session)
23 BuildRequires:  pkgconfig(dbus-1)
24 BuildRequires:  pkgconfig(dlog)
25 BuildRequires:  pkgconfig(ecore)
26 BuildRequires:  pkgconfig(glib-2.0)
27 BuildRequires:  pkgconfig(libgum)
28 BuildRequires:  pkgconfig(libtzplatform-config)
29 BuildRequires:  pkgconfig(libxml-2.0)
30 BuildRequires:  pkgconfig(libsystemd)
31 BuildRequires:  pkgconfig(pkgmgr)
32 BuildRequires:  pkgconfig(pkgmgr-info)
33 BuildRequires:  pkgconfig(pkgmgr-installer)
34 BuildRequires:  pkgconfig(vconf)
35 %if "%{tizen_profile_name}" == "tv"
36 BuildRequires:  pkgconfig(capi-network-bluetooth)
37 BuildRequires:  pkgconfig(capi-network-bluetooth-tv)
38 BuildRequires:  pkgconfig(farfield-voice-api)
39 %endif
40
41 BuildRequires:  cmake
42
43 %description
44 Speech To Text client library and daemon.
45
46
47 %package devel
48 Summary:    Speech To Text header files for STT development
49 Group:      Graphics & UI Framework/Development
50 Requires:   %{name} = %{version}-%{release}
51
52 %package file-devel
53 Summary:    File To Text header files for STT FILE development
54 Group:      Graphics & UI Framework/Development
55 Requires:   %{name} = %{version}-%{release}
56
57 %package setting-devel
58 Summary:    Speech To Text setting header files for STT development
59 Group:      Graphics & UI Framework/Development
60 Requires:   %{name} = %{version}-%{release}
61
62 %package engine-devel
63 Summary:    Speech To Text engine header files for STT development
64 Group:      Graphics & UI Framework/Development
65 Requires:   %{name} = %{version}-%{release}
66
67 %description devel
68 Speech To Text header files for STT development.
69
70 %description file-devel
71 File To Text header files for STT FILE development.
72
73 %description setting-devel
74 Speech To Text setting header files for STT development.
75
76 %description engine-devel
77 Speech To Text engine header files for STT development.
78
79 %if 0%{?gcov:1}
80 %package gcov
81 Summary:        Speech To Text (gcov)
82 Group:          Graphics & UI Framework/Voice Framework
83 %description gcov
84 Speech To Text gcov objects
85 %endif
86
87
88 %prep
89 %setup -q -n %{name}-%{version}
90 cp %{SOURCE1001} %{SOURCE1002} .
91
92
93 %build
94 export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
95 export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
96 export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
97
98 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
99 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
100 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
101
102 %if 0%{?gcov:1}
103 export CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
104 export CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
105 export FFLAGS="$FFLAGS -fprofile-arcs -ftest-coverage"
106 export LDFLAGS="$LDFLAGS -lgcov"
107 %endif
108
109
110 %if "%{tizen_profile_name}" == "tv"
111 export CFLAGS="$CFLAGS -DTV_PRODUCT"
112 cmake . -DCMAKE_INSTALL_PREFIX=/usr -DLIBDIR=%{_libdir} -DBINDIR=%{_bindir} -DINCLUDEDIR=%{_includedir} \
113         -DTZ_SYS_RO_SHARE=%TZ_SYS_RO_SHARE -DTZ_SYS_BIN=%TZ_SYS_BIN -D_TV_PRODUCT=TRUE
114 %else
115 cmake . -DCMAKE_INSTALL_PREFIX=/usr -DLIBDIR=%{_libdir} -DBINDIR=%{_bindir} -DINCLUDEDIR=%{_includedir} \
116         -DTZ_SYS_RO_SHARE=%TZ_SYS_RO_SHARE -DTZ_SYS_BIN=%TZ_SYS_BIN
117 %endif
118
119 make %{?jobs:-j%jobs}
120
121 %if 0%{?gcov:1}
122 mkdir -p gcov-obj
123 find . -name 'stt-engine-parser.c.gcno' -exec rm {} \;
124 find . -name '*_client.c.gcno' -exec rm {} \;
125 find . -name '*_config_mgr.c.gcno' -exec rm {} \;
126 find . -name '*_config_parser.c.gcno' -exec rm {} \;
127 find . -name '*_dbus.c.gcno' -exec rm {} \;
128 find . -name '*_engine.c.gcno' -exec rm {} \;
129 find . -name '*_file.c.gcno' -exec rm {} \;
130 find . -name '*_network.c.gcno' -exec rm {} \;
131 find . -name '*_setting.c.gcno' -exec rm {} \;
132 find . -name 'sttd_*.gcno' -exec rm {} \;
133 find . -name 'stte.c.gcno' -exec rm {} \;
134 find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
135 %endif
136
137
138 %install
139 rm -rf %{buildroot}
140
141 %if "%{tizen_profile_name}" == "tv"
142 mv -f org.tizen.voice.sttserver.tv.service org.tizen.voice.sttserver.service
143 %endif
144
145 %make_install
146
147 %if 0%{?gcov:1}
148 mkdir -p %{buildroot}%{_datadir}/gcov/obj
149 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
150 %endif
151
152
153 %post
154 /sbin/ldconfig
155
156 mkdir -p %{_libdir}/voice/
157
158 mkdir -p %{TZ_SYS_RO_SHARE}/voice/test
159
160 %postun -p /sbin/ldconfig
161
162
163 %files
164 %manifest %{name}.manifest
165 %license LICENSE.APLv2
166 %defattr(-,root,root,-)
167 %{_libdir}/lib*.so
168 /etc/dbus-1/session.d/stt-server.conf
169 %{TZ_SYS_RO_SHARE}/voice/stt/1.0/stt-config.xml
170 %{TZ_SYS_RO_SHARE}/dbus-1/services/org.tizen.voice.sttserver.service
171 %{TZ_SYS_RO_SHARE}/dbus-1/services/org.tizen.voice.sttservercustom.service
172 #%{TZ_SYS_RO_SHARE}/voice/test/stt-test
173 #%{TZ_SYS_BIN}/*
174 %{_bindir}/voice_getengine
175 %{TZ_SYS_RO_ETC}/package-manager/parserlib/metadata/libstt-engine-parser.so*
176
177 %files devel
178 %manifest %{name}-devel.manifest
179 %defattr(-,root,root,-)
180 %{_libdir}/pkgconfig/stt.pc
181 %{_includedir}/stt.h
182 %{_includedir}/stt_internal.h
183
184 %files file-devel
185 %defattr(-,root,root,-)
186 %{_libdir}/pkgconfig/stt-file.pc
187 %{_includedir}/stt_file.h
188
189 %files setting-devel
190 %defattr(-,root,root,-)
191 %{_libdir}/pkgconfig/stt-setting.pc
192 %{_includedir}/stt_setting.h
193
194 %files engine-devel
195 %defattr(-,root,root,-)
196 %{_libdir}/pkgconfig/stt-engine.pc
197 %{_includedir}/stte.h
198 %{_includedir}/stte_internal.h
199
200 %if 0%{?gcov:1}
201 %files gcov
202 %{_datadir}/gcov/obj/*
203 %endif