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