Sophie

Sophie

distrib > Mageia > 8 > i586 > by-pkgid > 24d446e6b595335660c788fc7db04269 > files > 3

espeak-ng-1.50-2.mga8.src.rpm

%bcond_with doc

%define major      1
%define libname    %mklibname %{name} %{major}
%define libnamedev %mklibname %{name} -d

Name:           espeak-ng
Version:        1.50
Release:        %mkrel 2
Summary:        Text to speech synthesis engine (eSpeak NG)
Group:          Sound/Utilities
License:        GPLv3+
URL:            https://github.com/espeak-ng/espeak-ng
Source0:        https://github.com/espeak-ng/espeak-ng/archive/%{version}/%{name}-%{version}.tar.gz
Patch0:         0001-fix-699-avoid-samplerate-clashing-with-LTO-in-gcc-10.patch

BuildRequires:  pcaudiolib-devel
BuildRequires:  rubygem(ronn)
%if %{with doc}
BuildRequires:  rubygem(kramdown)
%endif

%description
The eSpeak NG (Next Generation) Text-to-Speech program is an open source speech
synthesizer that supports over 70 languages. It is based on the eSpeak engine
created by Jonathan Duddington. It uses spectral formant synthesis by default
which sounds robotic, but can be configured to use Klatt formant synthesis
or MBROLA to give it a more natural sound.

#------------------------------------------------

%package -n     %{libname}
Summary:        Text to speech library (eSpeak NG)
Group:          System/Libraries
Requires:       %{name} >= %{version}

%description -n %{libname}
The eSpeak NG (Next Generation) Text-to-Speech program is an open source speech
synthesizer that supports over 70 languages. It is based on the eSpeak engine
created by Jonathan Duddington. It uses spectral formant synthesis by default
which sounds robotic, but can be configured to use Klatt formant synthesis
or MBROLA to give it a more natural sound.

#------------------------------------------------

%package -n     %{libnamedev}
Summary:        Development files for %{name}
Group:          Development/C++
Requires:       %{libname} = %{version}-%{release}
Provides:       %{name}-devel = %{version}-%{release}

%description -n %{libnamedev}
Development files for eSpeak NG, a software speech synthesizer.

#------------------------------------------------

%package vim
Summary:        Vim syntax highlighting for espeak-ng data files
Group:          Documentation
BuildArch:      noarch
Requires:       %{name} >= %{version}-%{release}

%description vim
Vim syntax highlighting for espeak-ng data files.

#------------------------------------------------

%if %{with doc}
%package doc
Summary:        Documentation for espeak-ng
Group:          Documentation
BuildArch:      noarch
Requires:       %{name} >= %{version}-%{release}

%description doc
Documentation for eSpeak NG, a software speech synthesizer.
%endif

#------------------------------------------------

%prep
%autosetup -p1

# Remove unused files to make sure we've got the License tag right
rm -rf src/include/compat/endian.h src/compat/getopt.c android/

%build
./autogen.sh
%configure \
   --disable-static \
   --with-extdict-ru \
   --with-extdict-zh \
   --with-extdict-zhy
%make_build src/espeak-ng src/speak-ng
%__make

%if %{with doc}
# Force utf8 for docs building
LC_ALL=C.UTF-8 make docs
%endif

%install
%make_install

find %{buildroot} -name '*.la' -delete

rm -vf %{buildroot}%{_libdir}/libespeak-ng-test.so*
# Remove files conflicting with espeak
rm -vf %{buildroot}%{_bindir}/{speak,espeak}
rm -vrf %{buildroot}%{_includedir}/espeak
# Move Vim files
mv %{buildroot}%{_datadir}/vim/addons %{buildroot}%{_datadir}/vim/vimfiles
rm -vrf %{buildroot}%{_datadir}/vim/registry

%check
ESPEAK_DATA_PATH=`pwd` LD_LIBRARY_PATH=src:${LD_LIBRARY_PATH} src/espeak-ng ...

%files
%license COPYING COPYING.IEEE
%doc CHANGELOG.md README.md
%{_bindir}/speak-ng
%{_bindir}/espeak-ng
%{_datadir}/espeak-ng-data
%{_mandir}/man1/speak-ng.1.*
%{_mandir}/man1/espeak-ng.1.*

%files -n %libname
%{_libdir}/lib%{name}.so.%{major}{,.*}

%files -n %{libnamedev}
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/lib%{name}.so
%{_includedir}/%{name}/

%files vim
%{_datadir}/vim/vimfiles/ftdetect/espeakfiletype.vim
%{_datadir}/vim/vimfiles/syntax/espeaklist.vim
%{_datadir}/vim/vimfiles/syntax/espeakrules.vim

%if %{with doc}
%files doc
%doc docs/*.html
%endif


%changelog
* Sun Dec 27 2020 daviddavid <daviddavid> 1.50-2.mga8
+ Revision: 1664191
- build manpages

* Sun Dec 27 2020 daviddavid <daviddavid> 1.50-1.mga8
+ Revision: 1664178
- initial package espeak-ng (needed for stardict)