]> git.pld-linux.org Git - packages/speech-dispatcher.git/blob - speech-dispatcher.spec
b8d923576457db5ad5340901ae3c573a3ef2ea5e
[packages/speech-dispatcher.git] / speech-dispatcher.spec
1 # Conditional build:
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
9 #
10 Summary:        A device independent layer for speech synthesis
11 #Summary(pl.UTF-8):     -
12 Name:           speech-dispatcher
13 Version:        0.6.6
14 Release:        0.1
15 License:        GPL v2
16 Group:          Applications
17 Source0:        http://www.freebsoft.org/pub/projects/speechd/%{name}-%{version}.tar.gz
18 # Source0-md5:  bbd7ebc5b0f1b3ec4d89ad66b20d5cea
19 Source1:        %{name}.init
20 Source2:        %{name}.sysconfig
21 Patch0:         %{name}-python-install.patch
22 URL:            http://www.freebsoft.org/
23 BuildRequires:  autoconf
24 BuildRequires:  automake
25 BuildRequires:  dotconf-devel
26 Buildrequires:  libatomic_ops
27 BuildRequires:  libtool
28 BuildRequires:  rpmbuild(macros) >= 1.228
29 Requires(post,preun):   /sbin/chkconfig
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}
36 Provides:       group(%{name})
37 Provides:       user(%{name})
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
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
83 %prep
84 %setup -q
85 %patch0 -p1
86
87 %build
88 %{__libtoolize}
89 %{__aclocal}
90 %{__autoconf}
91 %{__autoheader}
92 %{__automake}
93 %configure \
94         %{?with_flite:--with-flite}%{!?with_flite:--without-flite} \
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} \
99         %{?with_pulse:--with-pulse}%{!?with_pulse:--without-pulse} \
100         --enable-static=%{?with_static_libs:yes}%{!?with_static_libs:no}
101
102 %{__make}
103
104 %install
105 rm -rf $RPM_BUILD_ROOT
106
107 install -d $RPM_BUILD_ROOT/var/run/speech-dispatcher
108
109 %{__make} install \
110         DESTDIR=$RPM_BUILD_ROOT
111
112 install -D %{SOURCE1}   $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
113 install -D %{SOURCE2}   $RPM_BUILD_ROOT/etc/sysconfig/%{name}
114
115 %clean
116 rm -rf $RPM_BUILD_ROOT
117
118 %pre
119 %groupadd -g 223 %{name}
120 %useradd -u 223 -g 223 -d /usr/share/empty -s /bin/false -c "%{name} user" %{name}
121
122 %post
123 /sbin/ldconfig
124 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
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
133
134 %postun
135 /sbin/ldconfig
136 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
137 if [ "$1" = "0" ]; then
138         %userremove %{name}
139         %groupremove %{name}
140 fi
141
142 %files
143 %defattr(644,root,root,755)
144 %doc AUTHORS ChangeLog NEWS README TODO
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}
147 %attr(755,root,root) %{_bindir}/*
148 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
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
157 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_cicero
158 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_espeak
159 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_festival
160 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_generic
161 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/*.conf
162 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/clients/*.conf
163 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/*.conf
164 %dir %attr(755,%{name},%{name}) /var/run/speech-dispatcher
165 %{_infodir}/spd-say.info*
166 %lang(cs) %{_infodir}/speech-dispatcher-cs.info*
167 %{_infodir}/speech-dispatcher.info*
168 %{_infodir}/ssip.info*
169
170 %files devel
171 %defattr(644,root,root,755)
172 %attr(755,root,root) %{_libdir}/lib*.so
173 %{_libdir}/lib*.la
174 %{_libdir}/speech-dispatcher/lib*.so
175 %{_libdir}/speech-dispatcher/lib*.la
176 %{_includedir}/*
177
178 %if %{with static_libs}
179 %files static
180 %defattr(644,root,root,755)
181 %{_libdir}/lib*.a
182 %{_libdir}/speech-dispatcher/lib*.a
183 %endif
184
185 %files -n python-%{name}
186 %defattr(644,root,root,755)
187 %dir %{py_sitescriptdir}/speechd
188 %{py_sitescriptdir}/speechd/*.py[c]
This page took 0.357845 seconds and 2 git commands to generate.