f09cbe4
%global _hardened_build 1
f09cbe4
031f6bb
Name:          speech-dispatcher
a84d6f3
Version:       0.8.8
Ondřej Lysoněk 648fcce
Release:       3%{?dist}
031f6bb
Summary:       To provide a high-level device independent layer for speech synthesis
031f6bb
Group:         System Environment/Libraries
Hemant Goyal 3c20b68
Hemant Goyal 3c20b68
# Almost all files are under GPLv2+, however 
Hemant Goyal 3c20b68
# src/c/clients/spdsend/spdsend.h is licensed under GPLv2,
Hemant Goyal 3c20b68
# which makes %%_bindir/spdsend GPLv2.
031f6bb
License:       GPLv2+ and GPLv2
d72c7be
URL:           http://devel.freebsoft.org/speechd
9f38c53
Source0:       http://www.freebsoft.org/pub/projects/speechd/%{name}-%{version}.tar.gz
d72c7be
Source1:       http://www.freebsoft.org/pub/projects/sound-icons/sound-icons-0.1.tar.gz
d72c7be
Source2:       speech-dispatcherd.service
d72c7be
2e87f0c
BuildRequires: alsa-lib-devel
8f9d689
BuildRequires: desktop-file-utils
2e87f0c
BuildRequires: dotconf-devel
Ondřej Lysoněk 648fcce
BuildRequires: espeak-ng-devel
25eabcc
BuildRequires: espeak-devel
2e87f0c
BuildRequires: flite-devel
25eabcc
Buildrequires: glib2-devel
dd8b70e
Buildrequires: intltool
4bc6784
Buildrequires: libao-devel
d72c7be
Buildrequires: libtool-ltdl-devel
ab672b4
Buildrequires: libsndfile-devel
63385de
Buildrequires: pulseaudio-libs-devel
d72c7be
BuildRequires: python3-devel
d72c7be
BuildRequires: python3-setuptools
25eabcc
BuildRequires: texinfo
d72c7be
BuildRequires: systemd
031f6bb
957e40e
Requires: speech-dispatcher-espeak
d72c7be
Requires(post): systemd
d72c7be
Requires(preun): systemd
d72c7be
Requires(postun): systemd
d72c7be
Hemant Goyal 3c20b68
%description
Hemant Goyal 3c20b68
* Common interface to different TTS engines
Hemant Goyal 3c20b68
* Handling concurrent synthesis requests – requests may come
Hemant Goyal 3c20b68
  asynchronously from multiple sources within an application
Hemant Goyal 3c20b68
  and/or from more different applications.
Hemant Goyal 3c20b68
* Subsequent serialization, resolution of conflicts and
Hemant Goyal 3c20b68
  priorities of incoming requests
Hemant Goyal 3c20b68
* Context switching – state is maintained for each client
Hemant Goyal 3c20b68
  connection independently, event for connections from
Hemant Goyal 3c20b68
  within one application.
Hemant Goyal 3c20b68
* High-level client interfaces for popular programming languages
Hemant Goyal 3c20b68
* Common sound output handling – audio playback is handled by
Hemant Goyal 3c20b68
  Speech Dispatcher rather than the TTS engine, since most engines
Hemant Goyal 3c20b68
  have limited sound output capabilities.
Hemant Goyal 3c20b68
Hemant Goyal 3c20b68
%package        devel
Hemant Goyal 3c20b68
Summary:        Development files for %{name}
Hemant Goyal 3c20b68
Group:          Development/Libraries
8f9d689
Requires:       %{name}%{_isa} = %{version}-%{release}
Hemant Goyal 3c20b68
License:        GPLv2+
Hemant Goyal 3c20b68
Hemant Goyal 3c20b68
%description    devel
Hemant Goyal 3c20b68
The %{name}-devel package contains libraries and header files for
Hemant Goyal 3c20b68
developing applications that use %{name}.
Hemant Goyal 3c20b68
Hemant Goyal 3c20b68
%package doc
2e87f0c
Summary:        Documentation for speech-dispatcher
2e87f0c
License:        GPLv2+
2e87f0c
Group:          Documentation
451dc2f
Requires:       %{name} = %{version}-%{release}
Hemant Goyal 3c20b68
Requires(post): /sbin/install-info
Hemant Goyal 3c20b68
Requires(preun):/sbin/install-info
d72c7be
BuildArch: noarch
Hemant Goyal 3c20b68
Hemant Goyal 3c20b68
%description doc
Hemant Goyal 3c20b68
speechd documentation
Hemant Goyal 3c20b68
9f38c53
%package utils
0e76f59
Summary:        Various utilities for speech-dispatcher
9f38c53
License:        GPLv2+
9f38c53
Group:          Applications/System
8f9d689
Requires:       %{name}%{_isa} = %{version}-%{release}
9f38c53
Requires:       python3-speechd = %{version}-%{release}
9f38c53
9f38c53
%description utils
9f38c53
Various utilities for speechd
9f38c53
8f9d689
%package espeak
8f9d689
Summary:        Speech Dispatcher espeak module
8f9d689
Requires:       %{name}%{_isa} = %{version}-%{release}
8f9d689
Obsoletes:      speech-dispatcher < 0.8.1-2
8f9d689
8f9d689
%description espeak
8f9d689
This package contains the espeak output module for Speech Dispatcher.
8f9d689
Ondřej Lysoněk 648fcce
%package espeak-ng
Ondřej Lysoněk 648fcce
Summary:        Speech Dispatcher espeak-ng module
Ondřej Lysoněk 648fcce
Requires:       %{name}%{_isa} = %{version}-%{release}
Ondřej Lysoněk 648fcce
Ondřej Lysoněk 648fcce
%description espeak-ng
Ondřej Lysoněk 648fcce
This package contains the espeak-ng output module for Speech Dispatcher.
Ondřej Lysoněk 648fcce
8f9d689
%package festival
8f9d689
Summary:        Speech Dispatcher festival module
8f9d689
Requires:       %{name}%{_isa} = %{version}-%{release}
8f9d689
Requires:       festival-freebsoft-utils
8f9d689
Obsoletes:      speech-dispatcher < 0.8.1-2
8f9d689
8f9d689
%description festival
8f9d689
This package contains the festival output module for Speech Dispatcher.
8f9d689
8f9d689
%package flite
8f9d689
Summary:        Speech Dispatcher flite module
8f9d689
Requires:       %{name}%{_isa} = %{version}-%{release}
8f9d689
Obsoletes:      speech-dispatcher < 0.8.1-2
8f9d689
8f9d689
%description flite
8f9d689
This package contains the flite output module for Speech Dispatcher.
8f9d689
d72c7be
%package -n python3-speechd
d72c7be
Summary:        Python 3 Client API for speech-dispatcher
2e87f0c
License:        GPLv2+
2e87f0c
Group:          Development/Libraries
8f9d689
Requires:       %{name}%{_isa} = %{version}-%{release}
9f38c53
Requires:       python3-pyxdg
Hemant Goyal 3c20b68
d72c7be
%description -n python3-speechd
92d1c88
Python 3 module for speech-dispatcher
Hemant Goyal 3c20b68
Hemant Goyal 3c20b68
%prep
9f38c53
%setup -q
7968fd4
ddeb0c8
tar xf %{SOURCE1}
ddeb0c8
Hemant Goyal 3c20b68
%build
9f38c53
%configure --disable-static \
9f38c53
	--with-alsa --with-pulse --with-libao \
9f38c53
	--without-oss --without-nas \
9f38c53
	--with-flite \
Ondřej Lysoněk 648fcce
	--with-espeak-ng \
9f38c53
	--sysconfdir=%{_sysconfdir} --with-default-audio-method=pulse
2e87f0c
33d4983
make %{?_smp_mflags} V=1
Hemant Goyal 3c20b68
Hemant Goyal 3c20b68
%install
643bccb
make install DESTDIR=%{buildroot} INSTALL="install -p"
Hemant Goyal 3c20b68
a986ad2
mkdir -p %{buildroot}%{_unitdir}
d72c7be
install -p -m 0644 %SOURCE2 %{buildroot}%{_unitdir}/
Hemant Goyal 3c20b68
ddeb0c8
install -p -m 0644 sound-icons-0.1/* %{buildroot}%{_datadir}/sounds/%{name}/
ddeb0c8
643bccb
%find_lang speech-dispatcher
643bccb
Hemant Goyal 3c20b68
#Remove %{_infodir}/dir file
25eabcc
rm -f %{buildroot}%{_infodir}/dir
Hemant Goyal 3c20b68
9f38c53
find %{buildroot} -name '*.la' -delete
Hemant Goyal 3c20b68
2e87f0c
# Move the config files from /usr/share to /etc
d72c7be
mkdir -p %{buildroot}%{_sysconfdir}/speech-dispatcher/clients
d72c7be
mkdir -p %{buildroot}%{_sysconfdir}/speech-dispatcher/modules
25eabcc
mv %{buildroot}%{_datadir}/speech-dispatcher/conf/speechd.conf %{buildroot}%{_sysconfdir}/speech-dispatcher/
25eabcc
mv %{buildroot}%{_datadir}/speech-dispatcher/conf/clients/* %{buildroot}%{_sysconfdir}/speech-dispatcher/clients
25eabcc
mv %{buildroot}%{_datadir}/speech-dispatcher/conf/modules/* %{buildroot}%{_sysconfdir}/speech-dispatcher/modules
2e87f0c
f72650f
# Create log dir
d72c7be
mkdir -p -m 0700 %{buildroot}%{_localstatedir}/log/speech-dispatcher/
25eabcc
8f9d689
# Verify the desktop files
8f9d689
desktop-file-validate %{buildroot}/%{_datadir}/speech-dispatcher/conf/desktop/speechd.desktop
8f9d689
d72c7be
# enable pulseaudio as default with a fallback to alsa
d72c7be
sed 's/# AudioOutputMethod "pulse,alsa"/AudioOutputMethod "pulse,alsa"/' %{buildroot}%{_sysconfdir}/speech-dispatcher/speechd.conf
25eabcc
Hemant Goyal 3c20b68
%post 
Hemant Goyal 3c20b68
/sbin/ldconfig
9f38c53
%systemd_post speech-dispatcherd.service
Hemant Goyal 3c20b68
Hemant Goyal 3c20b68
%postun
Hemant Goyal 3c20b68
/sbin/ldconfig
9f38c53
%systemd_postun_with_restart speech-dispatcherd.service
Hemant Goyal 3c20b68
Hemant Goyal 3c20b68
%preun
9f38c53
%systemd_preun speech-dispatcherd.service
Hemant Goyal 3c20b68
9f38c53
%post doc
9f38c53
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
9f38c53
/sbin/install-info %{_infodir}/spd-say.info %{_infodir}/dir || :
9f38c53
/sbin/install-info %{_infodir}/ssip.info %{_infodir}/dir || :
e6db91e
9f38c53
%preun doc
9f38c53
if [ $1 = 0 ]; then
9f38c53
 /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
9f38c53
 /sbin/install-info --delete %{_infodir}/spd-say.info %{_infodir}/dir || :
9f38c53
 /sbin/install-info --delete %{_infodir}/ssip.info %{_infodir}/dir || :
9f38c53
fi
e6db91e
643bccb
%files -f speech-dispatcher.lang
8f9d689
%{!?_licensedir:%global license %%doc}
8f9d689
%license COPYING
8f9d689
%doc NEWS README
Hemant Goyal 3c20b68
%dir %{_sysconfdir}/speech-dispatcher/
Hemant Goyal 3c20b68
%dir %{_sysconfdir}/speech-dispatcher/clients
Hemant Goyal 3c20b68
%dir %{_sysconfdir}/speech-dispatcher/modules
4bc6784
%config(noreplace) %{_sysconfdir}/speech-dispatcher/speechd.conf
4bc6784
%config(noreplace) %{_sysconfdir}/speech-dispatcher/clients/*.conf
4bc6784
%config(noreplace) %{_sysconfdir}/speech-dispatcher/modules/*.conf
8f9d689
%exclude %{_sysconfdir}/speech-dispatcher/modules/espeak*.conf
8f9d689
%exclude %{_sysconfdir}/speech-dispatcher/modules/festival.conf
8f9d689
%exclude %{_sysconfdir}/speech-dispatcher/modules/flite.conf
9f38c53
%{_bindir}/speech-dispatcher
643bccb
%{_datadir}/speech-dispatcher/
Hemant Goyal 3c20b68
%{_libdir}/libspeechd.so.2
f096ae2
%{_libdir}/libspeechd.so.2.6.0
8f9d689
%dir %{_libdir}/speech-dispatcher-modules/
8f9d689
%{_libdir}/speech-dispatcher-modules/sd_cicero
8f9d689
%{_libdir}/speech-dispatcher-modules/sd_dummy
8f9d689
%{_libdir}/speech-dispatcher-modules/sd_generic
2e87f0c
%dir %{_libdir}/speech-dispatcher
d72c7be
%{_libdir}/speech-dispatcher/spd*.so
4bc6784
%{_datadir}/sounds/speech-dispatcher
f72650f
%dir %attr(0700, root, root) %{_localstatedir}/log/speech-dispatcher/
a986ad2
%{_unitdir}/speech-dispatcherd.service
Hemant Goyal 3c20b68
Hemant Goyal 3c20b68
%files devel
Hemant Goyal 3c20b68
%{_includedir}/*
Hemant Goyal 3c20b68
%{_libdir}/lib*.so
643bccb
%{_libdir}/pkgconfig/*.pc
Hemant Goyal 3c20b68
Hemant Goyal 3c20b68
%files doc
Hemant Goyal 3c20b68
%{_infodir}/*
Hemant Goyal 3c20b68
9f38c53
%files utils
9f38c53
%{_bindir}/spd-conf
9f38c53
%{_bindir}/spd-say
9f38c53
%{_bindir}/spdsend
Hemant Goyal 3c20b68
8f9d689
%files espeak
8f9d689
%config(noreplace) %{_sysconfdir}/speech-dispatcher/modules/espeak.conf
8f9d689
%{_libdir}/speech-dispatcher-modules/sd_espeak
8f9d689
Ondřej Lysoněk 648fcce
%files espeak-ng
Ondřej Lysoněk 648fcce
%config(noreplace) %{_sysconfdir}/speech-dispatcher/modules/espeak-ng.conf
Ondřej Lysoněk 648fcce
%{_libdir}/speech-dispatcher-modules/sd_espeak-ng
Ondřej Lysoněk 648fcce
8f9d689
%files festival
8f9d689
%config(noreplace) %{_sysconfdir}/speech-dispatcher/modules/festival.conf
8f9d689
%{_libdir}/speech-dispatcher-modules/sd_festival
8f9d689
8f9d689
%files flite
8f9d689
%config(noreplace) %{_sysconfdir}/speech-dispatcher/modules/flite.conf
8f9d689
%{_libdir}/speech-dispatcher-modules/sd_flite
8f9d689
d72c7be
%files -n python3-speechd
33d4983
%{python3_sitearch}/speechd*
Hemant Goyal 3c20b68
Hemant Goyal 3c20b68
%changelog
Ondřej Lysoněk 648fcce
* Mon Jan 29 2018 Ondřej Lysoněk <olysonek@redhat.com> - 0.8.8-3
Ondřej Lysoněk 648fcce
- Add support for espeak-ng, add speech-dispatcher-espeak-ng subpackage
Ondřej Lysoněk 648fcce
643bccb
* Thu Jan 25 2018 Rex Dieter <rdieter@fedoraproject.org> - 0.8.8-2
643bccb
- include translations, pkgconfig support (#1538715)
643bccb
- own %%_datadir/speech-dispatcher (#1480893)
643bccb
a84d6f3
* Tue Nov  7 2017 Peter Robinson <pbrobinson@fedoraproject.org> 0.8.8-1
a84d6f3
- 0.8.8
a84d6f3
b86823a
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.7-3
b86823a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
b86823a
258a725
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.7-2
258a725
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
258a725
955e1ad
* Tue May 16 2017 Peter Robinson <pbrobinson@fedoraproject.org> 0.8.7-1
955e1ad
- 0.8.7
955e1ad
138e6bd
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.6-3
138e6bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
138e6bd
3a8baf9
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.8.6-2
3a8baf9
- Rebuild for Python 3.6
3a8baf9
f003bec
* Wed Dec  7 2016 Peter Robinson <pbrobinson@fedoraproject.org> 0.8.6-1
f003bec
- 0.8.6
f003bec
85cc786
* Wed Aug 10 2016 Peter Robinson <pbrobinson@fedoraproject.org> 0.8.5-1
85cc786
- 0.8.5
85cc786
2e3f835
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.4-2
85cc786
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
2e3f835
c65af8d
* Wed Apr 20 2016 Peter Robinson <pbrobinson@fedoraproject.org> 0.8.4-1
c65af8d
- 0.8.4
c65af8d
f975d62
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.3-4
f975d62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
f975d62
2b6fc7c
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.3-3
2b6fc7c
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
2b6fc7c
40e8699
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.3-2
40e8699
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
40e8699
0c929b1
* Fri Jun 12 2015 Peter Robinson <pbrobinson@fedoraproject.org> 0.8.3-1
0c929b1
- 0.8.3
0c929b1
ab672b4
* Mon May 18 2015 Peter Robinson <pbrobinson@fedoraproject.org> 0.8.2-5
ab672b4
- Add missing libsndfile dependency to fix sound icon support
ab672b4
957e40e
* Tue Apr 14 2015 Peter Robinson <pbrobinson@fedoraproject.org> 0.8.2-4
957e40e
- Always install the espeak plugin
957e40e
451dc2f
* Fri Mar 20 2015 Peter Robinson <pbrobinson@fedoraproject.org> 0.8.2-3
451dc2f
- Fix noarch docs Requires
451dc2f
8f9d689
* Fri Mar 20 2015 Peter Robinson <pbrobinson@fedoraproject.org> 0.8.2-2
8f9d689
- Use %%license
8f9d689
- Make packaging more modular (rhbz #799140)
8f9d689
ddeb0c8
* Fri Mar 20 2015 Peter Robinson <pbrobinson@fedoraproject.org> 0.8.2-1
ddeb0c8
- 0.8.2
ddeb0c8
9f38c53
* Mon Sep 29 2014 Peter Robinson <pbrobinson@fedoraproject.org> 0.8.1-1
9f38c53
- 0.8.1
9f38c53
- Split utils into sub package
9f38c53
f09cbe4
* Fri Aug 29 2014 Peter Robinson <pbrobinson@fedoraproject.org> 0.8.1-0.1rc1
f09cbe4
- 0.8.1 rc1
f09cbe4
- Enable hardened build
f09cbe4
48e1ac9
* Thu Aug 21 2014 Kevin Fenzi <kevin@scrye.com> - 0.8-11
48e1ac9
- Rebuild for rpm bug 1131960
48e1ac9
4aff30e
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8-10
4aff30e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
4aff30e
35877f0
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8-9
35877f0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
35877f0
c8f6d5a
* Tue May 27 2014 Kalev Lember <kalevlember@gmail.com> - 0.8-8
c8f6d5a
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
c8f6d5a
56da18f
* Thu Mar 27 2014 Peter Robinson <pbrobinson@fedoraproject.org> 0.8-7
56da18f
- Rebuild
56da18f
20ced9f
* Fri Nov  1 2013 Matthias Clasen <mclasen@redhat.com> 0.8-6
20ced9f
- Avoid a crash in the festival module (#995639)
20ced9f
532f62b
* Tue Aug 13 2013 Peter Robinson <pbrobinson@fedoraproject.org> 0.8-5
532f62b
- Install clients as not longer installed by default (fixes RHBZ 996337)
532f62b
Rex Dieter 0eb53e7
* Sat Aug 10 2013 Rex Dieter <rdieter@fedoraproject.org> 0.8-4
Rex Dieter 0eb53e7
- include/install missing headers
Rex Dieter 0eb53e7
33d4983
* Wed Aug  7 2013 Peter Robinson <pbrobinson@fedoraproject.org> 0.8-3
33d4983
- Drop libao and python2 bindings
33d4983
bde1c36
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8-2
bde1c36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
bde1c36
d72c7be
* Thu Feb 28 2013 Peter Robinson <pbrobinson@fedoraproject.org> 0.8-1
d72c7be
- Update to 0.8 stable release
92d1c88
- Rename python package for consistency
92d1c88
- Add python3 bindings - fixes RHBZ 867958
d72c7be
- Update the systemd scriptlets to the macroized versions
d72c7be
465a1a3
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-10
465a1a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
465a1a3
Bastien Nocera 51e62ac
* Thu Nov 29 2012 Bastien Nocera <bnocera@redhat.com> 0.7.1-9
Bastien Nocera 51e62ac
- Move RPM hacks to source patches
Bastien Nocera 51e62ac
052f7e5
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-8
052f7e5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
052f7e5
dbc4ff5
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-7
dbc4ff5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild