Blame SPECS/speech-dispatcher.spec

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