f09cbe
%global _hardened_build 1
f09cbe
031f6b
Name:          speech-dispatcher
ddeb0c
Version:       0.8.2
8f9d68
Release:       2%{?dist}
031f6b
Summary:       To provide a high-level device independent layer for speech synthesis
031f6b
Group:         System Environment/Libraries
Hemant Goyal 3c20b6
Hemant Goyal 3c20b6
# Almost all files are under GPLv2+, however 
Hemant Goyal 3c20b6
# src/c/clients/spdsend/spdsend.h is licensed under GPLv2,
Hemant Goyal 3c20b6
# which makes %%_bindir/spdsend GPLv2.
031f6b
License:       GPLv2+ and GPLv2
d72c7b
URL:           http://devel.freebsoft.org/speechd
9f38c5
Source0:       http://www.freebsoft.org/pub/projects/speechd/%{name}-%{version}.tar.gz
d72c7b
Source1:       http://www.freebsoft.org/pub/projects/sound-icons/sound-icons-0.1.tar.gz
d72c7b
Source2:       speech-dispatcherd.service
20ced9
Patch1: thread-cancel-crash.patch
d72c7b
2e87f0
BuildRequires: alsa-lib-devel
8f9d68
BuildRequires: desktop-file-utils
2e87f0
BuildRequires: dotconf-devel
25eabc
BuildRequires: espeak-devel
2e87f0
BuildRequires: flite-devel
25eabc
Buildrequires: glib2-devel
dd8b70
Buildrequires: intltool
4bc678
Buildrequires: libao-devel
d72c7b
Buildrequires: libtool-ltdl-devel
63385d
Buildrequires: pulseaudio-libs-devel
d72c7b
BuildRequires: python3-devel
d72c7b
BuildRequires: python3-setuptools
25eabc
BuildRequires: texinfo
d72c7b
BuildRequires: systemd
031f6b
031f6b
%ifnarch s390 s390x
031f6b
BuildRequires: libraw1394
Hemant Goyal 90cb07
%endif
Hemant Goyal 90cb07
d72c7b
Requires(post): systemd
d72c7b
Requires(preun): systemd
d72c7b
Requires(postun): systemd
d72c7b
Hemant Goyal 3c20b6
%description
Hemant Goyal 3c20b6
* Common interface to different TTS engines
Hemant Goyal 3c20b6
* Handling concurrent synthesis requests – requests may come
Hemant Goyal 3c20b6
  asynchronously from multiple sources within an application
Hemant Goyal 3c20b6
  and/or from more different applications.
Hemant Goyal 3c20b6
* Subsequent serialization, resolution of conflicts and
Hemant Goyal 3c20b6
  priorities of incoming requests
Hemant Goyal 3c20b6
* Context switching – state is maintained for each client
Hemant Goyal 3c20b6
  connection independently, event for connections from
Hemant Goyal 3c20b6
  within one application.
Hemant Goyal 3c20b6
* High-level client interfaces for popular programming languages
Hemant Goyal 3c20b6
* Common sound output handling – audio playback is handled by
Hemant Goyal 3c20b6
  Speech Dispatcher rather than the TTS engine, since most engines
Hemant Goyal 3c20b6
  have limited sound output capabilities.
Hemant Goyal 3c20b6
Hemant Goyal 3c20b6
%package        devel
Hemant Goyal 3c20b6
Summary:        Development files for %{name}
Hemant Goyal 3c20b6
Group:          Development/Libraries
8f9d68
Requires:       %{name}%{_isa} = %{version}-%{release}
Hemant Goyal 3c20b6
License:        GPLv2+
Hemant Goyal 3c20b6
Hemant Goyal 3c20b6
%description    devel
Hemant Goyal 3c20b6
The %{name}-devel package contains libraries and header files for
Hemant Goyal 3c20b6
developing applications that use %{name}.
Hemant Goyal 3c20b6
Hemant Goyal 3c20b6
%package doc
2e87f0
Summary:        Documentation for speech-dispatcher
2e87f0
License:        GPLv2+
2e87f0
Group:          Documentation
8f9d68
Requires:       %{name}%{_isa} = %{version}-%{release}
Hemant Goyal 3c20b6
Requires(post): /sbin/install-info
Hemant Goyal 3c20b6
Requires(preun):/sbin/install-info
d72c7b
BuildArch: noarch
Hemant Goyal 3c20b6
Hemant Goyal 3c20b6
%description doc
Hemant Goyal 3c20b6
speechd documentation
Hemant Goyal 3c20b6
9f38c5
%package utils
9f38c5
Summary:        Documentation for speech-dispatcher
9f38c5
License:        GPLv2+
9f38c5
Group:          Applications/System
8f9d68
Requires:       %{name}%{_isa} = %{version}-%{release}
9f38c5
Requires:       python3-speechd = %{version}-%{release}
9f38c5
9f38c5
%description utils
9f38c5
Various utilities for speechd
9f38c5
8f9d68
%package espeak
8f9d68
Summary:        Speech Dispatcher espeak module
8f9d68
Requires:       %{name}%{_isa} = %{version}-%{release}
8f9d68
Obsoletes:      speech-dispatcher < 0.8.1-2
8f9d68
8f9d68
%description espeak
8f9d68
This package contains the espeak output module for Speech Dispatcher.
8f9d68
8f9d68
%package festival
8f9d68
Summary:        Speech Dispatcher festival module
8f9d68
Requires:       %{name}%{_isa} = %{version}-%{release}
8f9d68
Requires:       festival-freebsoft-utils
8f9d68
Obsoletes:      speech-dispatcher < 0.8.1-2
8f9d68
8f9d68
%description festival
8f9d68
This package contains the festival output module for Speech Dispatcher.
8f9d68
8f9d68
%package flite
8f9d68
Summary:        Speech Dispatcher flite module
8f9d68
Requires:       %{name}%{_isa} = %{version}-%{release}
8f9d68
Obsoletes:      speech-dispatcher < 0.8.1-2
8f9d68
8f9d68
%description flite
8f9d68
This package contains the flite output module for Speech Dispatcher.
8f9d68
d72c7b
%package -n python3-speechd
d72c7b
Summary:        Python 3 Client API for speech-dispatcher
2e87f0
License:        GPLv2+
2e87f0
Group:          Development/Libraries
8f9d68
Requires:       %{name}%{_isa} = %{version}-%{release}
9f38c5
Requires:       python3-pyxdg
Hemant Goyal 3c20b6
d72c7b
%description -n python3-speechd
92d1c8
Python 3 module for speech-dispatcher
Hemant Goyal 3c20b6
Hemant Goyal 3c20b6
%prep
9f38c5
%setup -q
20ced9
%patch1 -p1 -b .crash
7968fd
ddeb0c
tar xf %{SOURCE1}
ddeb0c
Hemant Goyal 3c20b6
%build
9f38c5
%configure --disable-static \
9f38c5
	--with-alsa --with-pulse --with-libao \
9f38c5
	--without-oss --without-nas \
9f38c5
	--with-flite \
9f38c5
	--sysconfdir=%{_sysconfdir} --with-default-audio-method=pulse
2e87f0
33d498
make %{?_smp_mflags} V=1
Hemant Goyal 3c20b6
Hemant Goyal 3c20b6
%install
Hemant Goyal 3c20b6
for dir in \
532f62
 config/ doc/ include/ src/audio/ src/api/ src/modules/ src/tests/ src/server/ src/clients/
Hemant Goyal 9e0dfe
 do
Hemant Goyal 9e0dfe
  pushd $dir
25eabc
  make install DESTDIR=%{buildroot} INSTALL="install -p"
Hemant Goyal 9e0dfe
 popd
Hemant Goyal 3c20b6
done
Hemant Goyal 3c20b6
a986ad
mkdir -p %{buildroot}%{_unitdir}
d72c7b
install -p -m 0644 %SOURCE2 %{buildroot}%{_unitdir}/
Hemant Goyal 3c20b6
ddeb0c
install -p -m 0644 sound-icons-0.1/* %{buildroot}%{_datadir}/sounds/%{name}/
ddeb0c
Hemant Goyal 3c20b6
#Remove %{_infodir}/dir file
25eabc
rm -f %{buildroot}%{_infodir}/dir
Hemant Goyal 3c20b6
9f38c5
find %{buildroot} -name '*.la' -delete
Hemant Goyal 3c20b6
2e87f0
# Move the config files from /usr/share to /etc
d72c7b
mkdir -p %{buildroot}%{_sysconfdir}/speech-dispatcher/clients
d72c7b
mkdir -p %{buildroot}%{_sysconfdir}/speech-dispatcher/modules
25eabc
mv %{buildroot}%{_datadir}/speech-dispatcher/conf/speechd.conf %{buildroot}%{_sysconfdir}/speech-dispatcher/
25eabc
mv %{buildroot}%{_datadir}/speech-dispatcher/conf/clients/* %{buildroot}%{_sysconfdir}/speech-dispatcher/clients
25eabc
mv %{buildroot}%{_datadir}/speech-dispatcher/conf/modules/* %{buildroot}%{_sysconfdir}/speech-dispatcher/modules
2e87f0
f72650
# Create log dir
d72c7b
mkdir -p -m 0700 %{buildroot}%{_localstatedir}/log/speech-dispatcher/
25eabc
8f9d68
# Verify the desktop files
8f9d68
desktop-file-validate %{buildroot}/%{_datadir}/speech-dispatcher/conf/desktop/speechd.desktop
8f9d68
d72c7b
# enable pulseaudio as default with a fallback to alsa
d72c7b
sed 's/# AudioOutputMethod "pulse,alsa"/AudioOutputMethod "pulse,alsa"/' %{buildroot}%{_sysconfdir}/speech-dispatcher/speechd.conf
25eabc
Hemant Goyal 3c20b6
%post 
Hemant Goyal 3c20b6
/sbin/ldconfig
9f38c5
%systemd_post speech-dispatcherd.service
Hemant Goyal 3c20b6
Hemant Goyal 3c20b6
%postun
Hemant Goyal 3c20b6
/sbin/ldconfig
9f38c5
%systemd_postun_with_restart speech-dispatcherd.service
Hemant Goyal 3c20b6
Hemant Goyal 3c20b6
%preun
9f38c5
%systemd_preun speech-dispatcherd.service
Hemant Goyal 3c20b6
9f38c5
%post doc
9f38c5
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
9f38c5
/sbin/install-info %{_infodir}/spd-say.info %{_infodir}/dir || :
9f38c5
/sbin/install-info %{_infodir}/ssip.info %{_infodir}/dir || :
e6db91
9f38c5
%preun doc
9f38c5
if [ $1 = 0 ]; then
9f38c5
 /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
9f38c5
 /sbin/install-info --delete %{_infodir}/spd-say.info %{_infodir}/dir || :
9f38c5
 /sbin/install-info --delete %{_infodir}/ssip.info %{_infodir}/dir || :
9f38c5
fi
e6db91
Hemant Goyal 3c20b6
%files
8f9d68
%{!?_licensedir:%global license %%doc}
8f9d68
%license COPYING
8f9d68
%doc NEWS README
Hemant Goyal 3c20b6
%dir %{_sysconfdir}/speech-dispatcher/
Hemant Goyal 3c20b6
%dir %{_sysconfdir}/speech-dispatcher/clients
Hemant Goyal 3c20b6
%dir %{_sysconfdir}/speech-dispatcher/modules
4bc678
%config(noreplace) %{_sysconfdir}/speech-dispatcher/speechd.conf
4bc678
%config(noreplace) %{_sysconfdir}/speech-dispatcher/clients/*.conf
4bc678
%config(noreplace) %{_sysconfdir}/speech-dispatcher/modules/*.conf
8f9d68
%exclude %{_sysconfdir}/speech-dispatcher/modules/espeak*.conf
8f9d68
%exclude %{_sysconfdir}/speech-dispatcher/modules/festival.conf
8f9d68
%exclude %{_sysconfdir}/speech-dispatcher/modules/flite.conf
9f38c5
%{_bindir}/speech-dispatcher
ddeb0c
%{_datadir}/speech-dispatcher/conf/desktop/speechd.desktop
Hemant Goyal 3c20b6
%{_libdir}/libspeechd.so.2
ddeb0c
%{_libdir}/libspeechd.so.2.5.0
8f9d68
%dir %{_libdir}/speech-dispatcher-modules/
8f9d68
%{_libdir}/speech-dispatcher-modules/sd_cicero
8f9d68
%{_libdir}/speech-dispatcher-modules/sd_dummy
8f9d68
%{_libdir}/speech-dispatcher-modules/sd_generic
2e87f0
%dir %{_libdir}/speech-dispatcher
d72c7b
%{_libdir}/speech-dispatcher/spd*.so
4bc678
%{_datadir}/sounds/speech-dispatcher
f72650
%dir %attr(0700, root, root) %{_localstatedir}/log/speech-dispatcher/
a986ad
%{_unitdir}/speech-dispatcherd.service
Hemant Goyal 3c20b6
Hemant Goyal 3c20b6
%files devel
Hemant Goyal 3c20b6
%{_includedir}/*
Hemant Goyal 3c20b6
%{_libdir}/lib*.so
Hemant Goyal 3c20b6
Hemant Goyal 3c20b6
%files doc
Hemant Goyal 3c20b6
%{_infodir}/*
Hemant Goyal 3c20b6
9f38c5
%files utils
9f38c5
%{_bindir}/spd-conf
9f38c5
%{_bindir}/spd-say
9f38c5
%{_bindir}/spdsend
Hemant Goyal 3c20b6
8f9d68
%files espeak
8f9d68
%config(noreplace) %{_sysconfdir}/speech-dispatcher/modules/espeak.conf
8f9d68
%{_libdir}/speech-dispatcher-modules/sd_espeak
8f9d68
8f9d68
%files festival
8f9d68
%config(noreplace) %{_sysconfdir}/speech-dispatcher/modules/festival.conf
8f9d68
%{_libdir}/speech-dispatcher-modules/sd_festival
8f9d68
8f9d68
%files flite
8f9d68
%config(noreplace) %{_sysconfdir}/speech-dispatcher/modules/flite.conf
8f9d68
%{_libdir}/speech-dispatcher-modules/sd_flite
8f9d68
d72c7b
%files -n python3-speechd
33d498
%{python3_sitearch}/speechd*
Hemant Goyal 3c20b6
Hemant Goyal 3c20b6
%changelog
8f9d68
* Fri Mar 20 2015 Peter Robinson <pbrobinson@fedoraproject.org> 0.8.2-2
8f9d68
- Use %%license
8f9d68
- Make packaging more modular (rhbz #799140)
8f9d68
ddeb0c
* Fri Mar 20 2015 Peter Robinson <pbrobinson@fedoraproject.org> 0.8.2-1
ddeb0c
- 0.8.2
ddeb0c
9f38c5
* Mon Sep 29 2014 Peter Robinson <pbrobinson@fedoraproject.org> 0.8.1-1
9f38c5
- 0.8.1
9f38c5
- Split utils into sub package
9f38c5
f09cbe
* Fri Aug 29 2014 Peter Robinson <pbrobinson@fedoraproject.org> 0.8.1-0.1rc1
f09cbe
- 0.8.1 rc1
f09cbe
- Enable hardened build
f09cbe
48e1ac
* Thu Aug 21 2014 Kevin Fenzi <kevin@scrye.com> - 0.8-11
48e1ac
- Rebuild for rpm bug 1131960
48e1ac
4aff30
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8-10
4aff30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
4aff30
35877f
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8-9
35877f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
35877f
c8f6d5
* Tue May 27 2014 Kalev Lember <kalevlember@gmail.com> - 0.8-8
c8f6d5
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
c8f6d5
56da18
* Thu Mar 27 2014 Peter Robinson <pbrobinson@fedoraproject.org> 0.8-7
56da18
- Rebuild
56da18
20ced9
* Fri Nov  1 2013 Matthias Clasen <mclasen@redhat.com> 0.8-6
20ced9
- Avoid a crash in the festival module (#995639)
20ced9
532f62
* Tue Aug 13 2013 Peter Robinson <pbrobinson@fedoraproject.org> 0.8-5
532f62
- Install clients as not longer installed by default (fixes RHBZ 996337)
532f62
Rex Dieter 0eb53e
* Sat Aug 10 2013 Rex Dieter <rdieter@fedoraproject.org> 0.8-4
Rex Dieter 0eb53e
- include/install missing headers
Rex Dieter 0eb53e
33d498
* Wed Aug  7 2013 Peter Robinson <pbrobinson@fedoraproject.org> 0.8-3
33d498
- Drop libao and python2 bindings
33d498
bde1c3
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8-2
bde1c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
bde1c3
d72c7b
* Thu Feb 28 2013 Peter Robinson <pbrobinson@fedoraproject.org> 0.8-1
d72c7b
- Update to 0.8 stable release
92d1c8
- Rename python package for consistency
92d1c8
- Add python3 bindings - fixes RHBZ 867958
d72c7b
- Update the systemd scriptlets to the macroized versions
d72c7b
465a1a
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-10
465a1a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
465a1a
Bastien Nocera 51e62a
* Thu Nov 29 2012 Bastien Nocera <bnocera@redhat.com> 0.7.1-9
Bastien Nocera 51e62a
- Move RPM hacks to source patches
Bastien Nocera 51e62a
052f7e
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-8
052f7e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
052f7e
dbc4ff
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-7
dbc4ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild