]> git.pld-linux.org Git - packages/speech-dispatcher.git/blob - speech-dispatcher.spec
- fix x86_64 build by adding -gcc.patch
[packages/speech-dispatcher.git] / speech-dispatcher.spec
1 #
2 # Conditional build:
3 %bcond_with     ibmtts          # commercial, proprietary IBM TTS synthesizer support
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
9 %bcond_without  static_libs     # don't build static libraries
10 #
11 Summary:        A device independent layer for speech synthesis
12 Summary(pl.UTF-8):      Niezależna od urządzenia warstwa obsługująca syntezę mowy
13 Name:           speech-dispatcher
14 Version:        0.6.7
15 Release:        1
16 License:        GPL v2
17 Group:          Applications/Sound
18 Source0:        http://www.freebsoft.org/pub/projects/speechd/%{name}-%{version}.tar.gz
19 # Source0-md5:  67432ad655b50fd7c1f1f79e012cfe3f
20 Source1:        %{name}.init
21 Source2:        %{name}.sysconfig
22 Patch0:         %{name}-python-install.patch
23 Patch1:         %{name}-info.patch
24 Patch2:         %{name}-gcc.patch
25 URL:            http://www.freebsoft.org/
26 %{?with_alsa:Buildrequires:     alsa-lib-devel}
27 BuildRequires:  autoconf
28 BuildRequires:  automake
29 BuildRequires:  dotconf-devel
30 %{?with_espeak:Buildrequires:   espeak-devel}
31 %{?with_flite:Buildrequires:    flite-devel}
32 %{?with_ibmtts:Buildrequires:   ibmtts-devel}
33 Buildrequires:  libatomic_ops
34 BuildRequires:  libtool
35 %{?with_nas:Buildrequires:      nas-devel}
36 %{?with_pulse:Buildrequires:    pulseaudio-devel}
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
45 Requires(post,preun):   /sbin/chkconfig
46 Requires(postun):       /usr/sbin/groupdel
47 Requires(postun):       /usr/sbin/userdel
48 Requires:       %{name}-libs = %{version}-%{release}
49 Requires:       rc-scripts
50 Provides:       group(%{name})
51 Provides:       user(%{name})
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
58 %description -l pl.UTF-8
59 Speech Dispatcher zapewnia niezależną od urządzenia warstwę
60 obsługującą syntezę mowy.
61
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
75 %package devel
76 Summary:        Header files for speech-dispatcher library
77 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki speech-dispatcher
78 Group:          Development/Libraries
79 Requires:       %{name}-libs = %{version}-%{release}
80
81 %description devel
82 Header files for speech-dispatcher library.
83
84 %description devel -l pl.UTF-8
85 Pliki nagłówkowe biblioteki speech-dispatcher.
86
87 %package static
88 Summary:        Static speech-dispatcher library
89 Summary(pl.UTF-8):      Statyczna biblioteka speech-dispatcher
90 Group:          Development/Libraries
91 Requires:       %{name}-devel = %{version}-%{release}
92
93 %description static
94 Static speech-dispatcher library.
95
96 %description static -l pl.UTF-8
97 Statyczna biblioteka speech-dispatcher.
98
99 %package -n python-%{name}
100 Summary:        Python library for communication with Speech Dispatcher
101 Summary(pl_PL.UTF-8):   Biblioteka Pythona do komunikacji ze Speech Dispatcherem
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
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.
114
115 %prep
116 %setup -q
117 %patch0 -p1
118 %patch1 -p1
119 %patch2 -p0
120
121 %build
122 %{__libtoolize}
123 %{__aclocal}
124 %{__autoconf}
125 %{__autoheader}
126 %{__automake}
127 %configure \
128         %{?with_flite:--with-flite}%{!?with_flite:--without-flite} \
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} \
133         %{?with_pulse:--with-pulse}%{!?with_pulse:--without-pulse} \
134         --enable-static=%{?with_static_libs:yes}%{!?with_static_libs:no}
135
136 %{__make}
137
138 %install
139 rm -rf $RPM_BUILD_ROOT
140
141 install -d $RPM_BUILD_ROOT/var/{log,run}/speech-dispatcher
142
143 %{__make} install \
144         DESTDIR=$RPM_BUILD_ROOT
145
146 install -D %{SOURCE1}   $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
147 install -D %{SOURCE2}   $RPM_BUILD_ROOT/etc/sysconfig/%{name}
148
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
154 %clean
155 rm -rf $RPM_BUILD_ROOT
156
157 %pre
158 %groupadd -g 224 %{name}
159 %useradd -u 224 -g 224 -G audio -d /usr/share/empty -s /bin/false -c "%{name} user" %{name}
160
161 %post
162 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
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
171
172 %postun
173 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
174 if [ "$1" = "0" ]; then
175         %userremove %{name}
176         %groupremove %{name}
177 fi
178
179 %post   libs -p /sbin/ldconfig
180 %postun libs -p /sbin/ldconfig
181
182 %files
183 %defattr(644,root,root,755)
184 %doc AUTHORS ChangeLog NEWS README TODO
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}
187 %attr(755,root,root) %{_bindir}/*
188 %dir %{_libdir}/speech-dispatcher
189 %attr(755,root,root) %{_libdir}/speech-dispatcher/libsdaudio.so.*
190 %dir %{_sysconfdir}/speech-dispatcher
191 %dir %{_sysconfdir}/speech-dispatcher/clients
192 %dir %{_sysconfdir}/speech-dispatcher/modules
193 %dir %{_libdir}/speech-dispatcher-modules
194 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_*
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
198 %dir %attr(755,%{name},%{name}) /var/run/speech-dispatcher
199 %dir %attr(755,%{name},%{name}) /var/log/speech-dispatcher
200 %{_infodir}/spd-say.info*
201 %lang(cs) %{_infodir}/speech-dispatcher-cs.info*
202 %{_infodir}/speech-dispatcher.info*
203 %{_infodir}/ssip.info*
204
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
210 %files devel
211 %defattr(644,root,root,755)
212 %attr(755,root,root) %{_libdir}/libspeechd.so
213 %{_libdir}/libspeechd.la
214 %{_includedir}/libspeechd.h
215
216 %if %{with static_libs}
217 %files static
218 %defattr(644,root,root,755)
219 %{_libdir}/libspeechd.a
220 %endif
221
222 %files -n python-%{name}
223 %defattr(644,root,root,755)
224 %dir %{py_sitescriptdir}/speechd
225 %{py_sitescriptdir}/speechd/*.py[co]
226 %{py_sitescriptdir}/speechd-*.egg-info
This page took 0.086619 seconds and 3 git commands to generate.