5832cd71e7f03b68fe962af06967a9779b2ad001
[platform/core/uifw/tts.git] / packaging / tts.spec
1 Name:       tts
2 Summary:    Text To Speech client library and daemon
3 Version:    0.2.44
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-system-info)
20 BuildRequires:  pkgconfig(dbus-1)
21 BuildRequires:  pkgconfig(dlog)
22 BuildRequires:  pkgconfig(ecore)
23 BuildRequires:  pkgconfig(glib-2.0)
24 BuildRequires:  pkgconfig(libgum)
25 BuildRequires:  pkgconfig(libtzplatform-config)
26 BuildRequires:  pkgconfig(libxml-2.0)
27 BuildRequires:  pkgconfig(libsystemd)
28 BuildRequires:  pkgconfig(pkgmgr)
29 BuildRequires:  pkgconfig(pkgmgr-info)
30 BuildRequires:  pkgconfig(pkgmgr-installer)
31 BuildRequires:  pkgconfig(vconf)
32 BuildRequires:  pkgconfig(bundle)
33
34
35 BuildRequires:  cmake
36
37 %description
38 Text To Speech client library and daemon.
39
40
41 %package devel
42 Summary:    Text To Speech header files for TTS development
43 Group:      libdevel
44 Requires:   %{name} = %{version}-%{release}
45
46 %package setting-devel
47 Summary:    Text To Speech setting header files for TTS development
48 Group:      libdevel
49 Requires:   %{name} = %{version}-%{release}
50
51 %package engine-devel
52 Summary:    Text To Speech engine header files for TTS development
53 Group:      libdevel
54 Requires:   %{name} = %{version}-%{release}
55
56 %description devel
57 Text To Speech header files for TTS development.
58
59 %description setting-devel
60 Text To Speech setting header files for TTS development.
61
62 %description engine-devel
63 Text To Speech engine header files for TTS development.
64
65 %if 0%{?gcov:1}
66 %package gcov
67 Summary:        Text To Speech (gcov)
68 Group:          Graphics & UI Framework/Voice Framework
69 %description gcov
70 Text To Speech gcov objects
71 %endif
72
73
74 %prep
75 %setup -q -n %{name}-%{version}
76 cp %{SOURCE1001} %{SOURCE1002} .
77
78
79 %build
80 export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
81 export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
82 export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
83
84 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
85 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
86 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
87
88 %if 0%{?gcov:1}
89 export CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
90 export CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
91 export FFLAGS="$FFLAGS -fprofile-arcs -ftest-coverage"
92 export LDFLAGS="$LDFLAGS -lgcov"
93 %endif
94
95 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIBDIR=%{_libdir} -DBINDIR=%{_bindir} -DINCLUDEDIR=%{_includedir} \
96         -DTZ_SYS_RO_SHARE=%TZ_SYS_RO_SHARE -DTZ_SYS_BIN=%TZ_SYS_BIN
97
98 make %{?jobs:-j%jobs}
99
100 %if 0%{?gcov:1}
101 mkdir -p gcov-obj
102 find . -name 'test_main.c.gcno' -exec rm {} \;
103 find . -name 'tts-engine-parser.c.gcno' -exec rm {} \;
104 find . -name '*_client.c.gcno' -exec rm {} \;
105 find . -name '*_config_*.gcno' -exec rm {} \;
106 find . -name '*_dbus.c.gcno' -exec rm {} \;
107 find . -name '*_setting.c.gcno' -exec rm {} \;
108 find . -name 'ttsd_*.gcno' -exec rm {} \;
109 find . -name 'ttse.c.gcno' -exec rm {} \;
110 find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
111 %endif
112
113
114 %install
115 rm -rf %{buildroot}
116
117 %if "%{tizen_profile_name}" == "tv"
118 mv -f org.tizen.voice.ttsserver.tv.service org.tizen.voice.ttsserver.service
119 mv -f org.tizen.voice.ttsnotiserver.tv.service org.tizen.voice.ttsnotiserver.service
120 mv -f org.tizen.voice.ttssrserver.tv.service org.tizen.voice.ttssrserver.service
121 mv -f org.tizen.voice.ttsinterruptserver.tv.service org.tizen.voice.ttsinterruptserver.service
122 %endif
123
124 %make_install
125
126 %if 0%{?gcov:1}
127 mkdir -p %{buildroot}%{_datadir}/gcov/obj
128 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
129 %endif
130
131 %post 
132 /sbin/ldconfig
133
134 mkdir -p %{_libdir}/voice
135
136 mkdir -p %{TZ_SYS_RO_SHARE}/voice/test
137
138
139 %postun -p /sbin/ldconfig
140
141 %files
142 %manifest %{name}.manifest
143 %license LICENSE
144 %defattr(-,root,root,-)
145 %{_libdir}/lib*.so
146 %{TZ_SYS_RO_SHARE}/voice/tts/1.0/tts-config.xml
147 %{TZ_SYS_RO_SHARE}/dbus-1/system-services/org.tizen.voice.ttsserver.service
148 %{TZ_SYS_RO_SHARE}/dbus-1/system-services/org.tizen.voice.ttsnotiserver.service
149 %{TZ_SYS_RO_SHARE}/dbus-1/system-services/org.tizen.voice.ttssrserver.service
150 %{TZ_SYS_RO_SHARE}/dbus-1/system-services/org.tizen.voice.ttsinterruptserver.service
151 #%{TZ_SYS_RO_SHARE}/voice/test/tts-test
152 %{_bindir}/tts_getengine
153 %{TZ_SYS_RO_ETC}/package-manager/parserlib/metadata/libtts-engine-parser.so*
154 #%{TZ_SYS_RO_ETC}/package-manager/parserlib/metadata/libtts-engine-language-pack-parser.so*
155 /etc/dbus-1/system.d/tts-server.conf
156
157 %files devel
158 %manifest %{name}-devel.manifest
159 %defattr(-,root,root,-)
160 %{_libdir}/pkgconfig/tts.pc
161 %{_includedir}/tts.h
162 %{_includedir}/tts_internal.h
163
164 %files setting-devel
165 %defattr(-,root,root,-)
166 %{_libdir}/pkgconfig/tts-setting.pc
167 %{_includedir}/tts_setting.h
168
169 %files engine-devel
170 %defattr(-,root,root,-)
171 %{_libdir}/pkgconfig/tts-engine.pc
172 %{_includedir}/ttse.h
173 %{_includedir}/ttse_internal.h
174
175 %if 0%{?gcov:1}
176 %files gcov
177 %{_datadir}/gcov/obj/*
178 %endif