Change uid and gid for service files
[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-info)
29 BuildRequires:  pkgconfig(pkgmgr-installer)
30 BuildRequires:  pkgconfig(vconf)
31 BuildRequires:  pkgconfig(bundle)
32
33
34 BuildRequires:  cmake
35
36 %description
37 Text To Speech client library and daemon.
38
39
40 %package devel
41 Summary:    Text To Speech header files for TTS development
42 Group:      libdevel
43 Requires:   %{name} = %{version}-%{release}
44
45 %package setting-devel
46 Summary:    Text To Speech setting header files for TTS development
47 Group:      libdevel
48 Requires:   %{name} = %{version}-%{release}
49
50 %package engine-devel
51 Summary:    Text To Speech engine header files for TTS development
52 Group:      libdevel
53 Requires:   %{name} = %{version}-%{release}
54
55 %description devel
56 Text To Speech header files for TTS development.
57
58 %description setting-devel
59 Text To Speech setting header files for TTS development.
60
61 %description engine-devel
62 Text To Speech engine header files for TTS development.
63
64
65 %prep
66 %setup -q -n %{name}-%{version}
67 cp %{SOURCE1001} %{SOURCE1002} .
68
69
70 %build
71 export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
72 export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
73 export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
74
75 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
76 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
77 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
78
79
80 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIBDIR=%{_libdir} -DBINDIR=%{_bindir} -DINCLUDEDIR=%{_includedir} \
81         -DTZ_SYS_RO_SHARE=%TZ_SYS_RO_SHARE -DTZ_SYS_BIN=%TZ_SYS_BIN
82
83 make %{?jobs:-j%jobs}
84
85 %install
86 rm -rf %{buildroot}
87
88 %if "%{tizen_profile_name}" == "tv"
89 mv -f org.tizen.voice.ttsserver.tv.service org.tizen.voice.ttsserver.service
90 mv -f org.tizen.voice.ttsnotiserver.tv.service org.tizen.voice.ttsnotiserver.service
91 mv -f org.tizen.voice.ttssrserver.tv.service org.tizen.voice.ttssrserver.service
92 mv -f org.tizen.voice.ttsinterruptserver.tv.service org.tizen.voice.ttsinterruptserver.service
93 %endif
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
110 %defattr(-,ui_fw,ui_fw,-)
111 %{_libdir}/lib*.so
112 %{TZ_SYS_RO_SHARE}/voice/tts/1.0/tts-config.xml
113 %{TZ_SYS_RO_SHARE}/dbus-1/system-services/org.tizen.voice.ttsserver.service
114 %{TZ_SYS_RO_SHARE}/dbus-1/system-services/org.tizen.voice.ttsnotiserver.service
115 %{TZ_SYS_RO_SHARE}/dbus-1/system-services/org.tizen.voice.ttssrserver.service
116 %{TZ_SYS_RO_SHARE}/dbus-1/system-services/org.tizen.voice.ttsinterruptserver.service
117 #%{TZ_SYS_RO_SHARE}/voice/test/tts-test
118 %{_bindir}/voice_getengine
119 %{TZ_SYS_RO_ETC}/package-manager/parserlib/metadata/libtts-engine-parser.so*
120 #%{TZ_SYS_RO_ETC}/package-manager/parserlib/metadata/libtts-engine-language-pack-parser.so*
121 /etc/dbus-1/system.d/tts-server.conf
122
123 %files devel
124 %manifest %{name}-devel.manifest
125 %defattr(-,root,root,-)
126 %{_libdir}/pkgconfig/tts.pc
127 %{_includedir}/tts.h
128 %{_includedir}/tts_internal.h
129
130 %files setting-devel
131 %defattr(-,root,root,-)
132 %{_libdir}/pkgconfig/tts-setting.pc
133 %{_includedir}/tts_setting.h
134
135 %files engine-devel
136 %defattr(-,root,root,-)
137 %{_libdir}/pkgconfig/tts-engine.pc
138 %{_includedir}/ttse.h
139 %{_includedir}/ttse_internal.h