Name:           flite
Version:        2.0.0
Release:        1%{?_dist_release}
Summary:        Small, fast speech synthesis engine (text-to-speech)
Summary(ja):    合成音声出力の軽量高速エンジン

Group:          Applications/Multimedia
License:        MIT
URL:            http://fife.speech.cs.cmu.edu/flite/
Source0:        http://fife.speech.cs.cmu.edu/flite/packed/%{name}-%{version}/%{name}-%{version}-release.tar.bz2
#Source1:        README-ALSA.txt
#Patch0:         flite-1.3-sharedlibs.patch
#Patch1:         flite-1.3-doc_texinfo.patch
#Patch2:         flite-1.3-alsa_support.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-root
#BuildRequires:  ed alsa-lib-devel autoconf
BuildRequires:  pulseaudio-libs-devel

Distribution:    Vine Linux
Vendor:          Project Vine

%description
Flite (festival-lite) is a small, fast run-time speech synthesis engine
developed at CMU and primarily designed for small embedded machines and/or
large servers. Flite is designed as an alternative synthesis engine to
Festival for voices built using the FestVox suite of voice building tools.

%description -l ja
Flite (festival-lite) は、CMUで開発された軽量高速合成音声エンジンであり、
小型組込マシンから大型サーバまで幅広く利用できるように設計されています。
Fliteは、FestVox音声合成ツールによって作成されたFestivalの軽量高速版として
設計されています。

%package devel
Summary: Development files for flite
Summary: flite の開発用ファイル
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
Development files for Flite, a small, fast speech synthesis engine.

%description devel -l ja
軽量高速合成音声エンジン Flite の開発用ファイルです。

%prep
%setup -q -n %{name}-%{version}-release
#patch0 -p1 -b .flite-1.3-sharedlibs
#patch1 -p1 -b .flite-1.3-doc_texinfo
#patch2 -p1 -b .flite-1.3-alsa_support
#cp -p %{SOURCE1} .


%build
#autoconf
%configure --disable-static --enable-shared --with-audio=pulseaudio
make %{?_smp_flags}

%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}

%clean
rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc ACKNOWLEDGEMENTS README COPYING
%{_bindir}/*
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%{_includedir}/flite
%{_libdir}/*.so
%exclude %{_libdir}/*.a

%changelog
* Tue Feb 17 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 2.0-1
- updated to 2.0
- BR: pulseaudio-libs-devel instead of alsa-lib-devel

* Sun Aug 23 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.3-16
- added Japanese summary based on 1.3-0vl2 (VinePlus/4.0(extras))
- merged changelog from 1.3-0vl2
  * Mon Dec  4 2006 Susumu Tanimura <stanimura-ngs@umin.ac.jp>
  - Rebuilt for VineLinux4.0
  * Tue Nov 14 2006 Susumu Tanimura <stanimura-ngs@umin.ac.jp>
  - Initial package for VineLinux3.2
  - Refurbished this spec totally but two patches have been remained.

* Sun Aug 23 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.3-15
- Initial build for Vine Linux

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Sat Mar 21 2009 Robert Scheck <robert@fedoraproject.org> - 1.3-13
- Removed moving of non-existing documentation flite directory

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Oct 11 2008 Peter Lemenkov <lemenkov@gmail.com> - 1.3-11
- Fix for RHEL 4
 
* Fri Jul 18 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.3-10
- fix license tag

* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.3-9
- Autorebuild for GCC 4.3

* Tue Nov 14 2006 Francois Aucamp <faucamp@csir.co.za> - 1.3-8
- Added comment to %%build stating why "_smp_flags" isn't used with make

* Mon Nov 13 2006 Francois Aucamp <faucamp@csir.co.za> - 1.3-7
- Modified alsa support patch file to patch "configure.in" instead of "configure"
- Added "autoconf" step to %%build
- Added BuildRequires: autoconf
- Fixed patch backup file suffixes
- Renamed patch files to a more standard format
- Moved header files from /usr/include to /usr/include/flite
- Added -p option to all cp operations (to preserve timestamps)

* Sun Nov 12 2006 Francois Aucamp <faucamp@csir.co.za> - 1.3-6
- Recreated patch to allow shared libraries to build correctly (sharedlibs.patch)
- "flite" and "flite_time" binaries now link to flite shared libraries (sharedlibs.patch)
- Simplified the documentation patch filename
- Modified patch steps in %%prep to create backup files with different suffixes
- Removed "_smp_flags" macro from %%build for all archs

* Fri Oct 20 2006 Francois Aucamp <faucamp@csir.co.za> - 1.3-5
- Modified "build" so that "_smp_flags" is only used for i386 arch

* Mon Oct 10 2006 Francois Aucamp <faucamp@csir.co.za> - 1.3-4
- Removed "_smp_flags" macro from "build" for x86_64 arch

* Tue Sep 26 2006 Francois Aucamp <faucamp@csir.co.za> - 1.3-3
- Added README-ALSA.txt (Source1)
- Removed subpackage: flite-devel-static
- Modified shared libraries patch (Patch0) to prevent building static libraries
- Renamed patch files: Patch0, Patch1

* Tue Sep 26 2006 Francois Aucamp <faucamp@csir.co.za> - 1.3-2
- Added flite 1.3 ALSA patch (Patch2) by Lukas Loehrer - thanks Anthony Green for pointing it out
- Added configure option: --with-audio=alsa
- Added BuildRequires: alsa-lib-devel

* Fri Sep 22 2006 Francois Aucamp <faucamp@csir.co.za> - 1.3-1
- Initial RPM build
