97125bf1d073922dd9fa7bb3e877b70e22f95f4d
[platform/core/uifw/stt.git] / packaging / stt.spec
1 Name:       stt
2 Summary:    Speech To Text client library and daemon
3 Version:    0.2.56
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(postun): /sbin/ldconfig
12 BuildRequires:  pkgconfig(aul)
13 BuildRequires:  pkgconfig(capi-appfw-app-manager)
14 BuildRequires:  pkgconfig(capi-base-common)
15 BuildRequires:  pkgconfig(capi-media-audio-io)
16 BuildRequires:  pkgconfig(capi-media-wav-player)
17 BuildRequires:  pkgconfig(capi-system-info)
18 BuildRequires:  pkgconfig(cynara-client)
19 BuildRequires:  pkgconfig(cynara-session)
20 BuildRequires:  pkgconfig(dbus-1)
21 BuildRequires:  pkgconfig(dlog)
22 BuildRequires:  pkgconfig(ecore)
23 BuildRequires:  pkgconfig(glib-2.0)
24 BuildRequires:  pkgconfig(libtzplatform-config)
25 BuildRequires:  pkgconfig(libxml-2.0)
26 BuildRequires:  pkgconfig(pkgmgr)
27 BuildRequires:  pkgconfig(pkgmgr-info)
28 BuildRequires:  pkgconfig(pkgmgr-installer)
29 BuildRequires:  pkgconfig(vconf)
30 %if "%{PRODUCT_TYPE}" == "TV"
31 BuildRequires:  pkgconfig(capi-network-bluetooth)
32 %endif
33
34 BuildRequires:  cmake
35
36 %description
37 Speech To Text client library and daemon.
38
39
40 %package devel
41 Summary:    Speech To Text header files for STT development
42 Group:      Graphics & UI Framework/Development
43 Requires:   %{name} = %{version}-%{release}
44
45 %package file-devel
46 Summary:    File To Text header files for STT FILE development
47 Group:      Graphics & UI Framework/Development
48 Requires:   %{name} = %{version}-%{release}
49
50 %package setting-devel
51 Summary:    Speech To Text setting header files for STT development
52 Group:      Graphics & UI Framework/Development
53 Requires:   %{name} = %{version}-%{release}
54
55 %package engine-devel
56 Summary:    Speech To Text engine header files for STT development
57 Group:      Graphics & UI Framework/Development
58 Requires:   %{name} = %{version}-%{release}
59
60 %description devel
61 Speech To Text header files for STT development.
62
63 %description file-devel
64 File To Text header files for STT FILE development.
65
66 %description setting-devel
67 Speech To Text setting header files for STT development.
68
69 %description engine-devel
70 Speech To Text engine header files for STT development.
71
72 %prep
73 %setup -q -n %{name}-%{version}
74 cp %{SOURCE1001} %{SOURCE1002} .
75
76
77 %build
78 export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
79 export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
80 export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
81
82 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
83 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
84 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
85 %if "%{PRODUCT_TYPE}" == "TV"
86 export CFLAGS="$CFLAGS -DTV_PRODUCT"
87 cmake . -DCMAKE_INSTALL_PREFIX=/usr -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir} \
88         -DTZ_SYS_RO_SHARE=%TZ_SYS_RO_SHARE -DTZ_SYS_BIN=%TZ_SYS_BIN -D_TV_PRODUCT=TRUE
89 %else
90 cmake . -DCMAKE_INSTALL_PREFIX=/usr -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir} \
91         -DTZ_SYS_RO_SHARE=%TZ_SYS_RO_SHARE -DTZ_SYS_BIN=%TZ_SYS_BIN
92 %endif
93
94 make %{?jobs:-j%jobs}
95
96 %install
97 rm -rf %{buildroot}
98 mkdir -p %{buildroot}%{TZ_SYS_RO_SHARE}/license
99 install LICENSE.APLv2 %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name}
100
101 %if "%{PRODUCT_TYPE}" == "TV"
102 mv -f org.tizen.voice.sttserver.tv.service org.tizen.voice.sttserver.service
103 %endif
104
105 %make_install
106
107 %post
108 /sbin/ldconfig
109
110 mkdir -p %{_libdir}/voice/
111
112 mkdir -p %{TZ_SYS_RO_SHARE}/voice/test
113
114
115 %postun -p /sbin/ldconfig
116
117 %files
118 %manifest %{name}.manifest
119 %license LICENSE.APLv2
120 %defattr(-,root,root,-)
121 %{_libdir}/lib*.so
122 /etc/dbus-1/session.d/stt-server.conf
123 %{TZ_SYS_RO_SHARE}/upgrade/scripts/500.stt_upgrade_24to30.sh
124 %{TZ_SYS_RO_SHARE}/voice/stt/1.0/stt-config.xml
125 %{TZ_SYS_RO_SHARE}/dbus-1/services/org.tizen.voice.sttserver.service
126 %{TZ_SYS_RO_SHARE}/voice/test/stt-test
127 %{TZ_SYS_RO_SHARE}/license/%{name}
128 %{TZ_SYS_RO_ETC}/package-manager/parserlib/metadata/libstt-engine-parser.so*
129
130 %files devel
131 %manifest %{name}-devel.manifest
132 %defattr(-,root,root,-)
133 %{_libdir}/pkgconfig/stt.pc
134 %{_includedir}/stt.h
135
136 %files file-devel
137 %defattr(-,root,root,-)
138 %{_libdir}/pkgconfig/stt-file.pc
139 %{_includedir}/stt_file.h
140
141 %files setting-devel
142 %defattr(-,root,root,-)
143 %{_libdir}/pkgconfig/stt-setting.pc
144 %{_includedir}/stt_setting.h
145
146 %files engine-devel
147 %defattr(-,root,root,-)
148 %{_libdir}/pkgconfig/stt-engine.pc
149 %{_includedir}/stte.h