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