Blame SPECS/espeak.spec

13d3b9
# package options
13d3b9
%global with_portaudio no
13d3b9
13d3b9
%if "%{with_portaudio}" == "yes"
13d3b9
%global backend runtime
13d3b9
%else
13d3b9
%global backend pulseaudio
13d3b9
%endif
13d3b9
13d3b9
Name:           espeak
13d3b9
Version:        1.47.11
81d479
Release:        4%{?dist}
13d3b9
Summary:        Software speech synthesizer (text-to-speech)
13d3b9
13d3b9
Group:          Applications/Multimedia
13d3b9
License:        GPLv3+
13d3b9
URL:            http://espeak.sourceforge.net
13d3b9
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}-source.zip
13d3b9
# Upstream ticket: https://sourceforge.net/p/espeak/patches/10/
13d3b9
Source1:        espeak.1
13d3b9
Patch0:         espeak-1.47-makefile-nostaticlibs.patch
13d3b9
Patch1:         espeak-1.47-ftbs-ld-libm.patch
13d3b9
# Upstream ticket: https://sourceforge.net/p/espeak/patches/10/
13d3b9
Patch2:         espeak-1.47-help-fix.patch
13d3b9
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
13d3b9
Requires(post): coreutils
13d3b9
%if "%{with_portaudio}" == "yes"
13d3b9
BuildRequires:  portaudio-devel
13d3b9
%endif
13d3b9
BuildRequires:  pulseaudio-libs-devel gcc-c++
13d3b9
13d3b9
13d3b9
%description
13d3b9
eSpeak is a software speech synthesizer for English and other languages.
13d3b9
13d3b9
eSpeak produces good quality English speech. It uses a different synthesis
13d3b9
method from other open source TTS engines, and sounds quite different.
13d3b9
It's perhaps not as natural or "smooth", but some people may find the
13d3b9
articulation clearer and easier to listen to for long periods. eSpeak supports
13d3b9
several languages, however in most cases these are initial drafts and need more
13d3b9
work to improve them.
13d3b9
13d3b9
It can run as a command line program to speak text from a file or from stdin.
13d3b9
13d3b9
13d3b9
%package devel
13d3b9
Summary: Development files for espeak
13d3b9
Group: Development/Libraries
13d3b9
Requires: %{name} = %{version}-%{release}
13d3b9
13d3b9
13d3b9
%description devel
13d3b9
Development files for eSpeak, a software speech synthesizer.
13d3b9
13d3b9
13d3b9
%prep
13d3b9
%setup -q -n espeak-%{version}-source
13d3b9
%patch0 -p1 -b .nostaticlibs
13d3b9
%patch1 -p1 -b .ftbs-ld-libm
13d3b9
%patch2 -p1 -b .help-fix
13d3b9
13d3b9
# Fix file permissions
13d3b9
find . -type f -exec chmod 0644 {} ";"
13d3b9
# Prepare documentation
13d3b9
rm -rf docs/images/.svn
13d3b9
mv docs html
13d3b9
sed -i 's/\r//' License.txt
13d3b9
# Compile against portaudio v19 (see ReadMe)
13d3b9
cp -f src/portaudio19.h src/portaudio.h
13d3b9
# Don't use the included binary voice dictionaries; we compile these from source
13d3b9
rm -f espeak-data/*_dict
13d3b9
13d3b9
13d3b9
%build
13d3b9
# Compile espeak
13d3b9
cd src
13d3b9
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" AUDIO=%{backend}
13d3b9
13d3b9
# Compile the TTS voice dictionaries
13d3b9
export ESPEAK_DATA_PATH=$RPM_BUILD_DIR/espeak-%{version}-source
13d3b9
cd ../dictsource
13d3b9
# Strange sed regex to parse ambiguous output from 'speak --voices', filled upstream BZ 3608811
13d3b9
for voice in $(../src/speak --voices | \
13d3b9
LANG=C sed -n '/Age\/Gender/ ! s/ *[0-9]\+ *\([^ ]\+\) *M\? *[^ ]\+ *\(\((\|[A-Z]\)[^ ]\+\)\? *\([^ ]\+\).*/\1 \4/ p' | \
13d3b9
sort | uniq); do \
13d3b9
    ../src/speak --compile=$voice; \
13d3b9
done
13d3b9
13d3b9
13d3b9
%install
13d3b9
rm -rf $RPM_BUILD_ROOT
13d3b9
cd $RPM_BUILD_DIR/espeak-%{version}-source/src
13d3b9
make install DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} INCDIR=%{_includedir}/espeak LIBDIR=%{_libdir} AUDIO=%{backend}
13d3b9
# Install manpage
13d3b9
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
13d3b9
cp -pf %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man1/
13d3b9
13d3b9
# Hack to workaround RPM bug 924660 to allow clean update from espeak-1.46 to espeak-1.47, could be probably dropped in f21+
13d3b9
mv %{buildroot}%{_datadir}/%{name}-data/voices/en %{buildroot}%{_datadir}/%{name}-data/voices/_en
13d3b9
touch %{buildroot}%{_datadir}/%{name}-data/voices/en
13d3b9
13d3b9
%clean
13d3b9
rm -rf $RPM_BUILD_ROOT
13d3b9
13d3b9
13d3b9
%post
13d3b9
/sbin/ldconfig
13d3b9
# Hack to workaround RPM bug 924660 to allow clean update from espeak-1.46 to espeak-1.47, could be probably dropped in f21+
13d3b9
if [ -d %{_datadir}/%{name}-data/voices/en ]
13d3b9
then
13d3b9
  rm -f %{_datadir}/%{name}-data/voices/en/*
13d3b9
  rmdir %{_datadir}/%{name}-data/voices/en
13d3b9
fi
13d3b9
[ -f %{_datadir}/%{name}-data/voices/_en ] && \
13d3b9
  cp -f %{_datadir}/%{name}-data/voices/_en %{_datadir}/%{name}-data/voices/en &> /dev/null || :
13d3b9
exit 0
13d3b9
13d3b9
%postun -p /sbin/ldconfig
13d3b9
13d3b9
13d3b9
%files
13d3b9
%defattr(-,root,root,-)
13d3b9
%doc $RPM_BUILD_DIR/espeak-%{version}-source/ReadMe $RPM_BUILD_DIR/espeak-%{version}-source/ChangeLog.txt $RPM_BUILD_DIR/espeak-%{version}-source/License.txt $RPM_BUILD_DIR/espeak-%{version}-source/html/
13d3b9
%{_mandir}/man1/espeak.1.gz
13d3b9
%{_bindir}/espeak
13d3b9
%{_datadir}/espeak-data
13d3b9
%{_libdir}/libespeak.so.*
13d3b9
# Hack to workaround RPM bug 924660 to allow clean update from espeak-1.46 to espeak-1.47, could be probably dropped in f21+
13d3b9
%ghost %{_datadir}/espeak-data/voices/en
13d3b9
13d3b9
%files devel
13d3b9
%defattr(-,root,root)
13d3b9
%{_libdir}/*.so
13d3b9
%{_includedir}/espeak
13d3b9
13d3b9
13d3b9
%changelog
81d479
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.47.11-4
81d479
- Mass rebuild 2014-01-24
81d479
81d479
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.47.11-3
81d479
- Mass rebuild 2013-12-27
81d479
13d3b9
* Mon Jul 15 2013 Jaroslav Å karvada <jskarvad@redhat.com> - 1.47.11-2
13d3b9
- Fixed manual page and built-in help to be up-to-date
13d3b9
13d3b9
* Tue May  7 2013 Jaroslav Å karvada <jskarvad@redhat.com> - 1.47.11-1
13d3b9
- New version
13d3b9
  Resolves: rhbz#958146
13d3b9
- Defuzzifed patches
13d3b9
13d3b9
* Mon Apr 29 2013 Jaroslav Å karvada <jskarvad@redhat.com> - 1.47.08-1
13d3b9
- New version
13d3b9
  Resolves: rhbz#957612
13d3b9
13d3b9
* Fri Apr 19 2013 Jaroslav Å karvada <jskarvad@redhat.com> - 1.47.07-1
13d3b9
- New version
13d3b9
  Resolves: rhbz#953772
13d3b9
13d3b9
* Tue Apr 16 2013 Jaroslav Å karvada <jskarvad@redhat.com> - 1.47.06-1
13d3b9
- New version
13d3b9
  Resolves: rhbz#952565
13d3b9
13d3b9
* Tue Apr  9 2013 Jaroslav Å karvada <jskarvad@redhat.com> - 1.47.05-1
13d3b9
- New version
13d3b9
  Resolves: rhbz#949839, rhbz#922911, rhbz#924831
13d3b9
13d3b9
* Wed Apr  3 2013 Jaroslav Å karvada <jskarvad@redhat.com> - 1.47.04-1
13d3b9
- New version
13d3b9
  Resolves: rhbz#947739
13d3b9
13d3b9
* Tue Mar 26 2013 Jaroslav Å karvada <jskarvad@redhat.com> - 1.47.03-4
13d3b9
- Added coreutils as post requirement
13d3b9
13d3b9
* Tue Mar 26 2013 Jaroslav Å karvada <jskarvad@redhat.com> - 1.47.03-3
13d3b9
- Workaround for RPM bug 924660 rewrote for post
13d3b9
13d3b9
* Sun Mar 24 2013 Jaroslav Å karvada <jskarvad@redhat.com> - 1.47.03-2
13d3b9
- Workaround for RPM bug 924660 moved from pretrans to pre
13d3b9
  Resolves: rhbz#926004
13d3b9
13d3b9
* Fri Mar 22 2013 Jaroslav Å karvada <jskarvad@redhat.com> - 1.47.03-1
13d3b9
- New version
13d3b9
  Resolves: rhbz#924700
13d3b9
- Workarounded RPM bug 924660 to allow clean update from 1.46 to 1.47
13d3b9
  Resolves: rhbz#924681
13d3b9
- Fixed script for recompilation of voices
13d3b9
13d3b9
* Wed Mar 20 2013 Jaroslav Å karvada <jskarvad@redhat.com> - 1.47.01-1
13d3b9
- New version
13d3b9
  Resolves: rhbz#923689
13d3b9
- Dropped add-err-check patch (upstreamed)
13d3b9
13d3b9
* Wed Feb 13 2013 Jaroslav Å karvada <jskarvad@redhat.com> - 1.46.02-8
13d3b9
- Add err checking (by add-err-check patch)
13d3b9
  Resolves: rhbz#904302
13d3b9
13d3b9
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.46.02-7
13d3b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
13d3b9
13d3b9
* Thu Nov 22 2012 Jaroslav Å karvada <jskarvad@redhat.com> - 1.46.02-6
13d3b9
- Reintroduced ftbs_ld_libm patch, it still links with libm
13d3b9
13d3b9
* Thu Oct  4 2012 Jaroslav Å karvada <jskarvad@redhat.com> - 1.46.02-5
13d3b9
- Fixed sources URL
13d3b9
13d3b9
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.46.02-4
13d3b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
13d3b9
13d3b9
* Tue Mar  6 2012 Jaroslav Å karvada <jskarvad@redhat.com> - 1.46.02-3
13d3b9
- Conditional portaudio support, portaudio is disabled by default
13d3b9
  Resolves: rhbz#799137
13d3b9
13d3b9
* Fri Jan 27 2012 Jaroslav Å karvada <jskarvad@redhat.com> - 1.46.02-2
13d3b9
- Drop portaudio for RHEL
13d3b9
13d3b9
* Fri Jan 13 2012 Jaroslav Å karvada <jskarvad@redhat.com> - 1.46.02-1
13d3b9
- New version
13d3b9
  Resolves: rhbz#781355
13d3b9
13d3b9
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.46.01-3
13d3b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
13d3b9
13d3b9
* Wed Dec 14 2011 Jaroslav Å karvada <jskarvad@redhat.com> - 1.46.01-2
13d3b9
- Runtime detection is the default again
13d3b9
  Resolves: rhbz#767434
13d3b9
13d3b9
* Wed Nov 23 2011 Jaroslav Å karvada <jskarvad@redhat.com> - 1.46.01-1
13d3b9
- New version
13d3b9
- Removed runtime-detection patch (upstreamed)
13d3b9
13d3b9
* Mon Sep 19 2011 Ville Skyttä <ville.skytta@iki.fi> - 1.45.05-3
13d3b9
- Build with $RPM_OPT_FLAGS and $RPM_LD_FLAGS.
13d3b9
13d3b9
* Fri Sep 16 2011 Jaroslav Å karvada <jskarvad@redhat.com> - 1.45.05-2
13d3b9
- Dropped ftbs_ld_libm patch (not needed now)
13d3b9
13d3b9
* Thu Sep 15 2011 Jaroslav Å karvada <jskarvad@redhat.com> - 1.45.05-1
13d3b9
- New version
13d3b9
- Updated runtime_detection patch
13d3b9
- Dropped gcc_no_libstdc++ patch
13d3b9
13d3b9
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.43-3
13d3b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
13d3b9
13d3b9
* Thu Feb 18 2010 Francois Aucamp <faucamp@fedoraproject.org> - 1.43-2
13d3b9
- Added patch declaring explicit libm linking dependency (RHBZ #565186)
13d3b9
13d3b9
* Sat Feb 13 2010 Francois Aucamp <faucamp@fedoraproject.org> - 1.43-1
13d3b9
- Update to version 1.43
13d3b9
- Added patch for runtime detection of pulseaudio, contributed by Kevin Kofler (RHBZ #512190)
13d3b9
13d3b9
* Thu Dec 17 2009 Francois Aucamp <faucamp@fedoraproject.org> - 1.42.04-1
13d3b9
- Update to version 1.42.04
13d3b9
- Revert: build against PortAudio instead of native PulseAudio (RHBZ #512190, #532674)
13d3b9
13d3b9
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.40.02-3
13d3b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
13d3b9
13d3b9
* Tue Jun 30 2009 Francois Aucamp <faucamp@fedoraproject.org> - 1.40.02-2
13d3b9
- Compile against pulseaudio instead of portaudio (RHBZ #481651)
13d3b9
13d3b9
* Mon Jun 22 2009 Francois Aucamp <faucamp@fedoraproject.org> - 1.40.02-1
13d3b9
- Update to version 1.40.02
13d3b9
- Added patch to compile with GCC and not to link to libstdc++ (not needed)
13d3b9
- Added manpage (thanks goes to Luke Yelavich from Ubuntu for writing it)
13d3b9
13d3b9
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.39-2
13d3b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
13d3b9
13d3b9
* Tue Oct 21 2008 Francois Aucamp <faucamp@fedoraproject.org> - 1.39-1
13d3b9
- Update to version 1.39
13d3b9
13d3b9
* Tue Feb 26 2008 Francois Aucamp <faucamp@fedoraproject.org> - 1.31-5
13d3b9
- Export ESPEAK_DATA_PATH in %%build to allow proper compilation of voice dictionaries
13d3b9
13d3b9
* Tue Jan 29 2008 Francois Aucamp <faucamp@fedoraproject.org> - 1.31-4
13d3b9
- Removed libjack patches as they are unnecessary
13d3b9
13d3b9
* Tue Jan 29 2008 Francois Aucamp <faucamp@fedoraproject.org> - 1.31-3
13d3b9
- Added "makefile_libjack" patch to link to libjack
13d3b9
- Added BuildRequires: jack-audio-connection-kit-devel
13d3b9
13d3b9
* Fri Jan 25 2008 Francois Aucamp <faucamp@fedoraproject.org> - 1.31-2
13d3b9
- Removed espeakedit (and associated patches and BuildRequires) from package
13d3b9
  until all phoneme table compilation functions can be moved into espeak (or a
13d3b9
  separate commandline app without wxGTK dependencies)
13d3b9
- Voices are still compiled from source, but using pre-compiled phoneme table
13d3b9
  from upstream until the above issue is resolved
13d3b9
13d3b9
* Thu Jan 24 2008 Francois Aucamp <faucamp@fedoraproject.org> - 1.31-1
13d3b9
- Update to version 1.31
13d3b9
- Compile phoneme tables and voice dictionaries from source instead of
13d3b9
  packaging pre-compiled binary data
13d3b9
- Added espeakedit as Source1
13d3b9
- Added BuildRequires: wxGTK-devel for espeakedit
13d3b9
- Added "makefile_rpmoptflags_wxversion" espeakedit patch to enable
13d3b9
  RPM_OPT_FLAGS and set the correct wxWidgets version
13d3b9
- Added "espeak_data_path" espeakedit patch to be able to set control the
13d3b9
  source directory that espeakedit's compiler uses
13d3b9
13d3b9
* Tue Jan 15 2008 Francois Aucamp <faucamp@fedoraproject.org> - 1.30-1
13d3b9
- Update to version 1.30
13d3b9
- Removed local "synthdata_strlen" patch (included upstream)
13d3b9
13d3b9
* Mon Aug 20 2007 Francois Aucamp <faucamp@csir.co.za> - 1.28-1
13d3b9
- Update to version 1.28
13d3b9
- Added "synthdata_strlen" patch to fix memory allocation issue on x86_64 (RHBZ #252712)
13d3b9
- Modified %%prep to build against portaudio v19 for F8 and later
13d3b9
- Upstream license changed from GPLv2+ to GPLv3+
13d3b9
13d3b9
* Tue Jun 19 2007 Francois Aucamp <faucamp@csir.co.za> - 1.26-1
13d3b9
- Update to version 1.26
13d3b9
- Modified %%prep to build against portaudio v19
13d3b9
13d3b9
* Tue Jun 05 2007 Francois Aucamp <faucamp@csir.co.za> - 1.25-1
13d3b9
- Update to version 1.25
13d3b9
13d3b9
* Tue May 08 2007 Francois Aucamp <faucamp@csir.co.za> - 1.24-1
13d3b9
- Update to version 1.24
13d3b9
13d3b9
* Tue Apr 24 2007 Francois Aucamp <faucamp@csir.co.za> - 1.23-1
13d3b9
- Update to version 1.23
13d3b9
- Added "makefile_nostaticlibs" patch so static libraries aren't installed
13d3b9
13d3b9
* Thu Feb 08 2007 Francois Aucamp <faucamp@csir.co.za> - 1.20-1
13d3b9
- Update to version 1.20
13d3b9
- Solves stack smash bug (RHBZ #227316)
13d3b9
13d3b9
* Fri Jan 26 2007 Francois Aucamp <faucamp@csir.co.za> - 1.19-1
13d3b9
- Update to version 1.19
13d3b9
- Removed "espeak-1.18-makefile_lpthread" patch as it has been included upstream
13d3b9
- Removed "espeak-1.18-makefile_smp" patch as it has been included upstream
13d3b9
- Removed "espeak-1.18-ptr_64bit" patch as it has been solved upstream
13d3b9
- Fixed espeak-data file permissions
13d3b9
13d3b9
* Tue Jan 16 2007 Francois Aucamp <faucamp@csir.co.za> - 1.18-2
13d3b9
- Created "espeak-1.18-ptr_64bit" patch to allow compilation on x86_64 (fixes 64-bit pointer issues)
13d3b9
- Created "espeak-1.18-makefile_smp" patch to allow parallel make ("_smp_mflags")
13d3b9
- Renamed "makefile_lpthread" patch to "espeak-1.18-makefile_lpthread"
13d3b9
13d3b9
* Mon Jan 15 2007 Francois Aucamp <faucamp@csir.co.za> - 1.18-1
13d3b9
- Update to version 1.18
13d3b9
- Dropped statically-linked "speak" executable (replaced by dynamically-linked "espeak" executable)
13d3b9
- Removed the "espeak program name" patch as it has been included upstream
13d3b9
- Removed "espeak program name" patch backup file cleanup from %%install
13d3b9
- Minor modification to "makefile lpthread" patch to account for new lib/executable
13d3b9
- Removed "BIN_NAME" variable from make in %%build (implemented upstream)
13d3b9
13d3b9
* Mon Nov 20 2006 Francois Aucamp <faucamp@csir.co.za> - 1.17-1
13d3b9
- Update to version 1.17
13d3b9
- Removed "makefile install target" patch as it has been included upstream
13d3b9
- Removed "AMD64 sizeof(char *)" patch as it has been included upstream
13d3b9
- Minor modification to "espeak program name" patch to allow patching current version
13d3b9
13d3b9
* Tue Nov 07 2006 Francois Aucamp <faucamp@csir.co.za> - 1.16-4
13d3b9
- Modified patch steps to create backups with different suffixes
13d3b9
- Renamed patch file extensions to .patch
13d3b9
- Added step in %%install to remove patch backup files in documentation
13d3b9
13d3b9
* Sat Nov 04 2006 Francois Aucamp <faucamp@csir.co.za> - 1.16-3
13d3b9
- Fixed source file permissions for -debuginfo package in %%prep
13d3b9
- Added RPM_OPT_FLAGS to "make" command in %%build; removed RPM_OPT_FLAGS makefile patch
13d3b9
- Modified makefile install target patch to include general support for setting compiler optimization flags via CXXFLAGS
13d3b9
- Removed creation of .orig backup files during patching
13d3b9
- Modified patch files to have different suffixes
13d3b9
13d3b9
* Thu Nov 02 2006 Francois Aucamp <faucamp@csir.co.za> - 1.16-2
13d3b9
- Added "install" target to makefile (makefile_install_target.patch)
13d3b9
- Added patch to fix AMD64 sizeof(char *) assumption bug (upstream request ID 1588938)
13d3b9
- Changed "portaudio" BuildRequires to "portaudio-devel"
13d3b9
- Added patch to makefile to allow RPM_OPT_FLAGS
13d3b9
- Added patch to replace all references to "speak" binary with "espeak"
13d3b9
- Moved header files to /usr/include/espeak
13d3b9
- Added rmdir command to "install" to remove empty soundicons directory
13d3b9
13d3b9
* Wed Oct 04 2006 Francois Aucamp <faucamp@csir.co.za> - 1.16-1
13d3b9
- Initial RPM build