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