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