]>
Commit | Line | Data |
---|---|---|
de0cb8a8 | 1 | # |
28b37384 | 2 | # Conditional build: |
de0cb8a8 | 3 | %bcond_with ibmtts # commercial, proprietary IBM TTS synthesizer support |
93ca17ef JB |
4 | %bcond_without flite # flite synthetizer support |
5 | %bcond_without espeak # espeak synthetizer support | |
6 | %bcond_without nas # NAS audio output support | |
7 | %bcond_without alsa # ALSA audio output supprot | |
8 | %bcond_without pulse # pulse audio output support | |
de0cb8a8 | 9 | %bcond_without static_libs # don't build static libraries |
28b37384 | 10 | # |
11 | Summary: A device independent layer for speech synthesis | |
de0cb8a8 | 12 | Summary(pl.UTF-8): Niezależna od urządzenia warstwa obsługująca syntezę mowy |
28b37384 | 13 | Name: speech-dispatcher |
2627d4d3 | 14 | Version: 0.6.7 |
15 | Release: 1 | |
28b37384 | 16 | License: GPL v2 |
de0cb8a8 | 17 | Group: Applications/Sound |
28b37384 | 18 | Source0: http://www.freebsoft.org/pub/projects/speechd/%{name}-%{version}.tar.gz |
2627d4d3 | 19 | # Source0-md5: 67432ad655b50fd7c1f1f79e012cfe3f |
162dab2c | 20 | Source1: %{name}.init |
21 | Source2: %{name}.sysconfig | |
b45d13c8 | 22 | Patch0: %{name}-python-install.patch |
93ca17ef | 23 | Patch1: %{name}-info.patch |
5b7af74c | 24 | Patch2: %{name}-gcc.patch |
28b37384 | 25 | URL: http://www.freebsoft.org/ |
93ca17ef | 26 | %{?with_alsa:Buildrequires: alsa-lib-devel} |
28b37384 | 27 | BuildRequires: autoconf |
28 | BuildRequires: automake | |
b4140df7 | 29 | BuildRequires: dotconf-devel |
93ca17ef | 30 | %{?with_espeak:Buildrequires: espeak-devel} |
28b37384 | 31 | %{?with_flite:Buildrequires: flite-devel} |
32 | %{?with_ibmtts:Buildrequires: ibmtts-devel} | |
93ca17ef JB |
33 | Buildrequires: libatomic_ops |
34 | BuildRequires: libtool | |
28b37384 | 35 | %{?with_nas:Buildrequires: nas-devel} |
28b37384 | 36 | %{?with_pulse:Buildrequires: pulseaudio-devel} |
93ca17ef JB |
37 | BuildRequires: python-devel >= 1:2.5 |
38 | BuildRequires: rpm-pythonprov | |
39 | BuildRequires: rpmbuild(macros) >= 1.228 | |
40 | BuildRequires: texinfo | |
41 | Requires(pre): /bin/id | |
42 | Requires(pre): /usr/bin/getgid | |
43 | Requires(pre): /usr/sbin/groupadd | |
44 | Requires(pre): /usr/sbin/useradd | |
de0cb8a8 | 45 | Requires(post,preun): /sbin/chkconfig |
93ca17ef JB |
46 | Requires(postun): /usr/sbin/groupdel |
47 | Requires(postun): /usr/sbin/userdel | |
48 | Requires: %{name}-libs = %{version}-%{release} | |
49 | Requires: rc-scripts | |
162dab2c | 50 | Provides: group(%{name}) |
51 | Provides: user(%{name}) | |
28b37384 | 52 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
53 | ||
54 | %description | |
55 | Speech Dispatcher provides a device independent layer for speech | |
56 | synthesis. | |
57 | ||
de0cb8a8 JB |
58 | %description -l pl.UTF-8 |
59 | Speech Dispatcher zapewnia niezależną od urządzenia warstwę | |
60 | obsługującą syntezę mowy. | |
28b37384 | 61 | |
93ca17ef JB |
62 | %package libs |
63 | Summary: Speech Dispatcher client library | |
64 | Summary(pl.UTF-8): Biblioteka kliencka Speech Dispatchera | |
65 | Group: Libraries | |
66 | ||
67 | %description libs | |
68 | Speech Dispatcher provides a device independent layer for speech | |
69 | synthesis. This package contains client library. | |
70 | ||
71 | %description libs -l pl.UTF-8 | |
72 | Speech Dispatcher zapewnia niezależną od urządzenia warstwę | |
73 | obsługującą syntezę mowy. Ten pakiet zawiera biblitotekę kliencką. | |
74 | ||
28b37384 | 75 | %package devel |
de0cb8a8 JB |
76 | Summary: Header files for speech-dispatcher library |
77 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki speech-dispatcher | |
28b37384 | 78 | Group: Development/Libraries |
93ca17ef | 79 | Requires: %{name}-libs = %{version}-%{release} |
28b37384 | 80 | |
81 | %description devel | |
de0cb8a8 | 82 | Header files for speech-dispatcher library. |
28b37384 | 83 | |
84 | %description devel -l pl.UTF-8 | |
de0cb8a8 | 85 | Pliki nagłówkowe biblioteki speech-dispatcher. |
28b37384 | 86 | |
87 | %package static | |
de0cb8a8 JB |
88 | Summary: Static speech-dispatcher library |
89 | Summary(pl.UTF-8): Statyczna biblioteka speech-dispatcher | |
28b37384 | 90 | Group: Development/Libraries |
91 | Requires: %{name}-devel = %{version}-%{release} | |
92 | ||
93 | %description static | |
de0cb8a8 | 94 | Static speech-dispatcher library. |
28b37384 | 95 | |
96 | %description static -l pl.UTF-8 | |
de0cb8a8 | 97 | Statyczna biblioteka speech-dispatcher. |
28b37384 | 98 | |
b4140df7 | 99 | %package -n python-%{name} |
100 | Summary: Python library for communication with Speech Dispatcher | |
de0cb8a8 | 101 | Summary(pl_PL.UTF-8): Biblioteka Pythona do komunikacji ze Speech Dispatcherem |
b4140df7 | 102 | Group: Libraries/Python |
103 | %pyrequires_eq python-modules | |
104 | ||
105 | %description -n python-%{name} | |
106 | Speech Dispatcher provides a device independent layer for speech | |
107 | synthesis. This package contains a Python library for communication | |
108 | with Speech Dispatcher. | |
109 | ||
de0cb8a8 JB |
110 | %description -n python-%{name} -l pl_PL.UTF-8 |
111 | Speech Dispatcher zapewnia niezależną od urządzenia warstwę | |
112 | obsługującą syntezę mowy. Ten pakiet zawiera bibliotekę Pythona do | |
113 | komunikacji ze Speech Dispatcherem. | |
b4140df7 | 114 | |
28b37384 | 115 | %prep |
116 | %setup -q | |
b45d13c8 | 117 | %patch0 -p1 |
93ca17ef | 118 | %patch1 -p1 |
5b7af74c | 119 | %patch2 -p0 |
28b37384 | 120 | |
121 | %build | |
122 | %{__libtoolize} | |
123 | %{__aclocal} | |
124 | %{__autoconf} | |
125 | %{__autoheader} | |
126 | %{__automake} | |
127 | %configure \ | |
128 | %{?with_flite:--with-flite}%{!?with_flite:--without-flite} \ | |
b45d13c8 | 129 | %{?with_ibmtts:--with-ibmtts}%{!?with_ibmtts:--without-ibmtts} \ |
130 | %{?with_espeak:--with-espeak}%{!?with_espeak:--without-espeak} \ | |
131 | %{?with_nas:--with-nas}%{!?with_nas:--without-nas} \ | |
132 | %{?with_alsa:--with-alsa}%{!?with_alsa:--without-alsa} \ | |
b4140df7 | 133 | %{?with_pulse:--with-pulse}%{!?with_pulse:--without-pulse} \ |
134 | --enable-static=%{?with_static_libs:yes}%{!?with_static_libs:no} | |
28b37384 | 135 | |
136 | %{__make} | |
137 | ||
138 | %install | |
139 | rm -rf $RPM_BUILD_ROOT | |
140 | ||
3ef6373a | 141 | install -d $RPM_BUILD_ROOT/var/{log,run}/speech-dispatcher |
162dab2c | 142 | |
28b37384 | 143 | %{__make} install \ |
144 | DESTDIR=$RPM_BUILD_ROOT | |
145 | ||
162dab2c | 146 | install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
147 | install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
148 | ||
93ca17ef JB |
149 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}/speechd |
150 | %py_postclean | |
151 | # library for engines output, API not included in -devel | |
152 | rm $RPM_BUILD_ROOT%{_libdir}/speech-dispatcher/libsdaudio.{so,la,a} | |
153 | ||
28b37384 | 154 | %clean |
155 | rm -rf $RPM_BUILD_ROOT | |
156 | ||
162dab2c | 157 | %pre |
66b2a9e1 | 158 | %groupadd -g 224 %{name} |
159 | %useradd -u 224 -g 224 -G audio -d /usr/share/empty -s /bin/false -c "%{name} user" %{name} | |
162dab2c | 160 | |
b4140df7 | 161 | %post |
b4140df7 | 162 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 |
162dab2c | 163 | /sbin/chkconfig --add %{name} |
164 | %service %{name} restart | |
165 | ||
166 | %preun | |
167 | if [ "$1" = "0" ]; then | |
168 | %service %{name} stop | |
169 | /sbin/chkconfig --del %{name} | |
170 | fi | |
b4140df7 | 171 | |
172 | %postun | |
b4140df7 | 173 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 |
162dab2c | 174 | if [ "$1" = "0" ]; then |
175 | %userremove %{name} | |
176 | %groupremove %{name} | |
177 | fi | |
b4140df7 | 178 | |
93ca17ef JB |
179 | %post libs -p /sbin/ldconfig |
180 | %postun libs -p /sbin/ldconfig | |
181 | ||
28b37384 | 182 | %files |
183 | %defattr(644,root,root,755) | |
48a0efe4 | 184 | %doc AUTHORS ChangeLog NEWS README TODO |
162dab2c | 185 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
186 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} | |
28b37384 | 187 | %attr(755,root,root) %{_bindir}/* |
b4140df7 | 188 | %dir %{_libdir}/speech-dispatcher |
93ca17ef | 189 | %attr(755,root,root) %{_libdir}/speech-dispatcher/libsdaudio.so.* |
b4140df7 | 190 | %dir %{_sysconfdir}/speech-dispatcher |
191 | %dir %{_sysconfdir}/speech-dispatcher/clients | |
192 | %dir %{_sysconfdir}/speech-dispatcher/modules | |
193 | %dir %{_libdir}/speech-dispatcher-modules | |
3ef6373a | 194 | %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_* |
b4140df7 | 195 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/*.conf |
196 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/clients/*.conf | |
197 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/*.conf | |
162dab2c | 198 | %dir %attr(755,%{name},%{name}) /var/run/speech-dispatcher |
3ef6373a | 199 | %dir %attr(755,%{name},%{name}) /var/log/speech-dispatcher |
404d22f5 | 200 | %{_infodir}/spd-say.info* |
201 | %lang(cs) %{_infodir}/speech-dispatcher-cs.info* | |
202 | %{_infodir}/speech-dispatcher.info* | |
203 | %{_infodir}/ssip.info* | |
28b37384 | 204 | |
93ca17ef JB |
205 | %files libs |
206 | %defattr(644,root,root,755) | |
207 | %attr(755,root,root) %{_libdir}/libspeechd.so.*.*.* | |
208 | %attr(755,root,root) %ghost %{_libdir}/libspeechd.so.2 | |
209 | ||
28b37384 | 210 | %files devel |
211 | %defattr(644,root,root,755) | |
93ca17ef JB |
212 | %attr(755,root,root) %{_libdir}/libspeechd.so |
213 | %{_libdir}/libspeechd.la | |
214 | %{_includedir}/libspeechd.h | |
28b37384 | 215 | |
b4140df7 | 216 | %if %{with static_libs} |
28b37384 | 217 | %files static |
218 | %defattr(644,root,root,755) | |
93ca17ef | 219 | %{_libdir}/libspeechd.a |
b4140df7 | 220 | %endif |
48a0efe4 | 221 | |
b4140df7 | 222 | %files -n python-%{name} |
223 | %defattr(644,root,root,755) | |
224 | %dir %{py_sitescriptdir}/speechd | |
93ca17ef JB |
225 | %{py_sitescriptdir}/speechd/*.py[co] |
226 | %{py_sitescriptdir}/speechd-*.egg-info |