Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37406982
en ru br
ALT Linux repos
S:2.5-alt0.4
5.0: 1.96-alt6
4.1: 1.96-alt5.M41.1
4.0: 1.96-alt2.6
3.0:
+backports:1.96-alt0.M30.1

Other repositories
Upstream:1.96-beta

Group :: Sound
RPM: festival

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define fst_version 1.96
%define est_version 1.2.96
%define release alt0.M30.1
%define estsuffix 1.2
%define festival_user _festival
%define festival_group audio
%define festival_home '/'
%def_disable static
%def_with est_dynamic_build
%def_with etc_festival_dir
%def_without legacy_server_scripts

Summary: general multi-lingual speech synthesis system
Name: festival
Version: %{fst_version}
Release: %{release}
Group: Sound
Packager: Igor Vlasenko <viy at altlinux.ru>
License: X11-style

URL: http://www.cstr.ed.ac.uk/projects/festival.html
%define srcURL0  http://www.cstr.ed.ac.uk/downloads/festival/1.95
%define srcURL1  http://festvox.org/packed/festival/%{fst_version}
%define srcURL2  http://www.speech.cs.cmu.edu/awb/fftest

Source0: %srcURL2/festival-%{fst_version}-beta.tar.bz2
Source1: %srcURL2/speech_tools-%{est_version}-beta.tar.bz2
Source2: README.ALTLinux
Source3: festival.init
Source4: server.scm

### TODO:

#README.alt
#russian lang in lang.scm
#french lang?
#xml dir apply
###

# adds /usr/lib/festival to PATH inside festival.

# It makes /usr/lib/festival useful place for external progs like mbrola.
Patch0: festival-1.95-alt-fix-path-audsp.patch
# is not too nesessary if alt-fix-path-audsp.patch is applied
Patch1: festival-1.4.1-audsp.patch
Patch2: festival-1.96-alt-russian-voice_msu_ru_nsh_cg.patch
Patch3: festival-1.4.3-alt-info-header.patch

# misc alt patches

# use /etc/festival/*.scm
# base required by sysconfdir.diff; is contained in datadir.diff
Patch140: festival-1.95-alt-sysconfdir-base.diff
Patch141: festival-1.95-alt-sysconfdir.diff

################################################

# festival_1.4.3 debian patches
# from festival_1.4.3-17.1.diff.gz
################################################
# not applied; use /etc/festival.scm /etc/festvars.scm
# base required by sysconfdir.diff; is contained in datadir.diff
Patch7: festival_1.4.3-sysconfdir-base.diff
Patch8: festival_1.4.3-languages-it-fi.diff
# support for possibility of xml data movement
Patch9: festival_1.4.3-xml-base.diff
Patch10: festival_1.4.3-debian-dir.diff
Patch11: festival_1.4.3-alaw.diff
Patch12: festival_1.96-scm.diff
Patch13: festival_1.4.3-examples.diff
Patch14: festival_1.4.3-sysconfdir.diff
# TODO:
# not applied; used if we move dtds; requires xml-base.diff
Patch15: festival_1.4.3-xmldir.diff

# not applied; we directly echo variables in config;

# the piece of fixed libestools location is not needed too
# because we do not split festival and speech_tools
Patch16: festival_1.4.3-config.diff
# not applied; we do not apply --datadir for estools too
# replaces sysconfdir-base
Patch17: festival_1.4.3-datadir.diff
# not applied; kept for consistency only. require --datadir
# removed SuSE festival-1.95-examples.patch
Patch18: festival_1.4.3-makefile.diff
# Not used; It is for consistency only; we use SuSE manpage
Patch19: festival_1.4.3-text2wave-manpage.diff
# not applied; kept for reference; breaks alt-fix-path-audsp.patch
# removes append ftlibdir/etc/$(OSTYPE):ftlibdir/etc to PATH
Patch20: festival_1.4.3-no-lib-etc.diff

################################################

# festival fedora patches
################################################
# Fix up various locations to be more FSSTND compliant
# note: it is a piece of patch. I moved libestools part.
# not applied; we fix config/config instead
Patch30: festival-1.95-fsstnd-fedora.patch

# Set defaults to American English instead of British English - the OALD

# dictionary (free for non-commercial use only) is needed for BE support
# not applied;
Patch31: festival-1.96-american.patch

# Whack some buildroot references

#Patch32: festival-buildroot.patch
# note: it is a piece of patch.
# I moved libestools part and removed SuSE examples.patch
Patch32: festival-1.95-buildroot-fedora.patch
# Use shared libraries; estools only - no festival code
# not applied --- we simply echo SHARED=1
#Patch33: festival-1.95-shared-build-fedora.patch
# not applied; already in 101
# Patch35: festival-1.95-gcc4-fedora.patch
# included in 1.96
# Patch36: festival-1.95-fix-localhost-connections.patch
# end festival fedora patches

# SuSE patches

# includes Patch23 fedora gcc;
Patch101:         festival-1.95-gcc4.patch
Patch102:         festival-1.95-examples.patch
Patch103:         festival-text2wave-manpage.patch
# it is safe to remove, as we set FTLIBDIR manually
Patch104:         festival-1.95-libdir.patch
Patch105:         festival-1.96.patch

# identical to fedora festival-1.95-fix-localhost-connections.patch

#Patch106:         festival-1.95-allow-localhost.patch
# identical to festival-1.4.1-audsp.patch
#Patch107:         festival-1.95-audsp.patch
# end festival SuSE patches

# Gentoo patches

Patch120:         festival-1.95_beta-asterisk.patch


# -------- speech_tools patches --------------------------

# speech-tools_1.2.95-0.4-*.diff are pieces of
# heavily edited debian's speech-tools_1.2.3-9.3.diff.gz
Patch41: speech-tools_1.2.95-0.4-debian-dir.diff
Patch42: speech-tools_1.2.96-0.4-config.diff
Patch43: speech-tools_1.2.95-0.4-remnants.diff
# mix c/c++ with sstream;
Patch45: speech-tools_1.2.96-0.4-esd-block-interrupts.diff
# not applied; should be improved in /doc
Patch46: speech-tools_1.2.95-0.4-datadir.diff
#is already contained in 1.96
#Patch47: speech-tools_1.2.95-0.4-lisp-lplus.diff
Patch49: speech-tools_1.2.96-0.4-sunaudio-default.diff
Patch50: speech-tools_1.2.96-0.4-alaw.diff

# fedora patches

# not applied; it is speech_tools piece of fedora buildroot.patch
Patch58: speech_tools-1.2.95-buildroot-fedora.patch

# SuSE patches

# obsolete in 1.96
# Patch110:        speech_tools-1.2.95-includes.patch
Patch111:        speech_tools-1.2.96-gcc4.patch
#Origname112:        speech_tools-1.2.95-config.patch
Patch112:        speech_tools-1.2.95-config-warn-on-suse.patch
Patch113:        speech_tools-1.2.96-gcc41.patch
Patch114:        speech_tools-1.2.95-returnvalue.patch

# misc alt patches

Patch138: speech_tools-1.2.95-alt-hts_support-fest1.96.patch
Patch139: speech_tools-1.2.95-alt-visible-linkage.patch

Requires: festvox

# --displayname

Requires: service => 0.5.9-alt1

# Automatically added by buildreq on Mon Sep 25 2006

BuildRequires: esound-devel gcc-c++ libaudiofile-devel libncurses-devel libstdc++-devel libtinfo-devel

%description
Festival is a general purpose text-to-speech system.  As well as
simply rendering text as speech it can be used in an interactive
command mode for testing and developing various aspects of speech
synthesis technology.

Festival offers a full text to speech system with various APIs, as
well an environment for development and research of speech synthesis
techniques. It includes a Scheme-based command interpreter.

Besides research into speech synthesis, festival is useful as a
stand-alone speech synthesis program. It is capable of producing
clearly understandable speech from text.

%package -n festival-devel
Summary: development kit for the Festival speech synthesis system
Group: Development/C
#Requires: libestools1.2-devel (>= 1:1.2.3-9)

%description -n festival-devel
This package contains the static library and headers that can be used to
develop programs that use Festival.  Documentation is now contained in the
separate festival-doc package

%if_enabled static
%package -n festival-devel-static
Summary: development kit for the Festival speech synthesis system
Group: Development/C
Requires: %name-devel = %fst_version-%release

%description -n festival-devel-static
This package contains the static library that can be used to
develop programs that use Festival.
%endif

%package -n speech_tools
Summary: Edinburgh Speech Tools - user binaries
Group:          Development/Other
Version: %est_version
Requires: libestools%estsuffix  = %est_version-%release
Provides: speech_tools-clients
Obsoletes: speech_tools-clients < 1.2.2-ipl3mdk

%description -n speech_tools
This package contains the various highly useful (to speech scientists, at
least) utility programs that use and accompany the Edinburgh Speech Tools
Library.

%package -n libestools%estsuffix
Summary: Edinburgh Speech Tools Library
Version: %est_version
License: X11-style
Group: Sound
URL: http://www.cstr.ed.ac.uk/projects/festival.html
Obsoletes: speech_tools < 1.2.2-ipl3mdk

%description -n libestools%estsuffix
A library for use in speech software, such as the festival speech synthesis
system.

%package -n libestools-devel
Summary: Edinburgh Speech Tools Library - developer's libraries and docs
# emacs syntax color cheat '
Version: %est_version
Group:          Development/C
Requires: libestools%estsuffix  = %est_version-%release
Obsoletes: speech_tools-devel < 1.2.2-ipl3mdk

%description -n libestools-devel
This package contains the header files, static libraries, and documentation
that developers using the Edinburgh Speech Tools Library will need.

%if_enabled static
%package -n libestools-devel-static
Summary: Edinburgh Speech Tools Library - static libraries
Group:          Development/C
Version: %est_version
Requires: libestools-devel  = %est_version-%release

%description -n libestools-devel-static
This package contains the static libraries
that developers using the Edinburgh Speech Tools Library may need.
%endif

%prep
%setup -q -n festival
%setup -q -T -b 1 -n speech_tools

cd $RPM_BUILD_DIR/festival
%patch0 -p1
%patch1 -p1
%patch3 -p1
#%patch4 -p0

%if_with etc_festival_dir
%patch140 -p1
%patch141 -p1
%else
%patch7 -p1
%patch14 -p1
%endif

%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1

# need not to depend on Patch8 (merge?)

%patch2 -p1


# is it worth applying?

#%patch31 -p1
%patch32 -p1
%patch101 -p0
%patch102 -p1
%patch103 -p1
%patch104 -p0
%patch105 -p0

%patch120 -p1


cd $RPM_BUILD_DIR/speech_tools
%patch41 -p1
%patch42 -p1
%patch43 -p1
%patch45 -p1
# # --libdir is used in build process :(
# #%patch46 -p1
%patch49 -p1
# 1.96 has simpler verison of this patch with conflict in EST_wave_utils.cc
# proper way is undo 1.96 changes and apply orig 1.95 patch
# ###>>>%patch50 -p1
%patch58 -p1

%patch111 -p1
%patch112 -p0
%patch113 -p1
%patch114 -p1

%patch138 -p1
%patch139 -p1

# prep Edinburgh Speech Tools

%__subst s/'# INCLUDE_MODULES += ESD_AUDIO'/'INCLUDE_MODULES += ESD_AUDIO'/ \
      config/config.in
%__subst -p 's,/usr/local\>,/usr,g' config/systems/default.mak
%if_with est_dynamic_build
%__subst s/'#SHARED='/'SHARED='/ config/config.in
%endif

# linking against libraries to avoid unresolved symbols

echo "PROJECT_LIBRARY_NEEDS_SYSLIBS_estbase = 1" >> config/project.mak
echo "PROJECT_LIBRARY_NEEDS_SYSLIBS_esttools = 1" >> config/project.mak
#echo "PROJECT_LIBRARY_USES_estools = estbase" >> config/project.mak
# is tinfo altlinux specific?
echo "PROJECT_LIBRARY_USES_estools = estbase tinfo" >> config/project.mak

%build
# Build Edinburgh Speech Tools
cd $RPM_BUILD_DIR/speech_tools
%add_optflags -Wno-non-template-friend

# parallel build fails :(

make MAKE_SHARED_LIB="g++ -shared -fno-shared-data -o XXX -Wl,--as-needed -Wl,-soname -Wl,YYY"

make test

# Build Festival

cd $RPM_BUILD_DIR/festival
%configure
cat <<EOF >>config/config
# FESTIVAL_HOME := %_prefix
# INCLUDE_TCL=1
FTLIBDIR := %_datadir/festival
# indicates that speech_tools are built shared
# SHARED = 1
# GCC_MAKE_SHARED_LIB = gcc -shared -o XXX
EOF

#make_build

# gcc4
#FTLIBDIR=%{_datadir}/festival make  CXXFLAGS="-ffriend-injection -fpermissive -Wno-deprecated -Wno-non-template-friend -fPIC" CFLAGS="-ffriend-injection -fpermissive -Wno-deprecated -Wno-non-template-friend -O0 -fPIC"
# gcc3
make  CXXFLAGS="-fpermissive -Wno-non-template-friend -fPIC" CFLAGS="-fpermissive -Wno-non-template-friend -O0 -fPIC"

export LD_LIBRARY_PATH=`pwd`/../speech_tools/lib
cd doc &&  %make_build festival.info

%install

# Install Edinburgh Speech Tools

cd $RPM_BUILD_DIR/speech_tools

S_PROGRAMS="bcat ch_lab ch_track ch_utt ch_wave dp na_play na_record ngram_build \
ngram_test ols ols_test pda pitchmark scfg_make scfg_parse scfg_test \
scfg_train sig2fv sigfilter spectgen tilt_analysis tilt_synthesis \
viterbi wagon wagon_test wfst_build wfst_run"
S_UNDOC="bcat dp ngram_build \
ngram_test ols ols_test pda pitchmark scfg_make scfg_parse scfg_test \
scfg_train sig2fv sigfilter spectgen tilt_analysis tilt_synthesis \
viterbi wagon wagon_test wfst_build wfst_run pm make_wagon_desc \
raw_to_xgraph resynth"
S_SCRIPTS="pm.prl raw_to_xgraph.prl make_wagon_desc.sh resynth.sh"
export S_PROGRAMS S_UNDOC S_SCRIPTS

install -d $RPM_BUILD_ROOT{%_libdir,%_bindir,%_datadir,%_includedir}

%if_with est_dynamic_build
# -- Installing package libestools1.2 --
cp lib/*.so.%{est_version} $RPM_BUILD_ROOT%_libdir/
ln -sf libestbase.so.%{est_version} $RPM_BUILD_ROOT%_libdir/libestbase.so.1.2
ln -sf libestools.so.%{est_version} $RPM_BUILD_ROOT%_libdir/libestools.so.1.2
ln -sf libeststring.so.%{est_version} $RPM_BUILD_ROOT%_libdir/libeststring.so.1.2
%endif

# -- Installing package speech_tools --

pushd main
cp $S_PROGRAMS $RPM_BUILD_ROOT%_bindir/
popd
pushd scripts
for i in $S_SCRIPTS; do \
dest=`echo $i | sed -e 's/\.\(prl\|sh\)$//'`; \
sed -e 's,__PERL__,/usr/bin/perl,g' \
<$i >$RPM_BUILD_ROOT%_bindir/$dest; \
chmod +x $RPM_BUILD_ROOT%_bindir/$dest; \
done
popd

# -- Installing package libestools1.2-dev --

install -d $RPM_BUILD_ROOT%_libdir/speech_tools/lib/siod \
$RPM_BUILD_ROOT%_includedir/speech_tools/{unix,instantiate,sigpr,rxp,ling_class}
cp lib/*.a $RPM_BUILD_ROOT%_libdir/
%if_with est_dynamic_build
ln -sf libestbase.so.1.2   $RPM_BUILD_ROOT%_libdir/libestbase.so
ln -sf libestools.so.1.2   $RPM_BUILD_ROOT%_libdir/libestools.so
ln -sf libeststring.so.1.2 $RPM_BUILD_ROOT%_libdir/libeststring.so
%endif

cp include/*.h $RPM_BUILD_ROOT%_includedir/speech_tools/
cp include/unix/*.h $RPM_BUILD_ROOT%_includedir/speech_tools/unix/
# Note: these are possibly internal headers (C++ lossage)
cp include/instantiate/*.h $RPM_BUILD_ROOT%_includedir/speech_tools/instantiate/

cp include/sigpr/*.h $RPM_BUILD_ROOT%_includedir/speech_tools/sigpr/
cp include/ling_class/*.h $RPM_BUILD_ROOT%_includedir/speech_tools/ling_class/
cp include/rxp/*.h $RPM_BUILD_ROOT%_includedir/speech_tools/rxp/
cp base_class/*.h $RPM_BUILD_ROOT%_includedir/speech_tools/

# Needed to compile things against speech_tools

cp -R config $RPM_BUILD_ROOT%_libdir/speech_tools/config
find $RPM_BUILD_ROOT%_libdir/speech_tools/config/ \
\( -name SCCS -o -name CVS -o -name RCS \) -print0 | \
xargs -0r rm -rf
cp make.include $RPM_BUILD_ROOT%_libdir/speech_tools/
cp lib/siod/*.scm $RPM_BUILD_ROOT%_libdir/speech_tools/lib/siod/

chmod +x $RPM_BUILD_ROOT%_libdir/speech_tools/config/rules/modules.sh
chmod +x $RPM_BUILD_ROOT%_libdir/speech_tools/config/system.sh

# we already instantiated templates in libsetools.

# it prevents festival from trying to instantiate it from speech_tools source
%__subst 's/^TEMPLATE_SPECIFIC = -DINSTANTIATE_TEMPLATES/TEMPLATE_SPECIFIC =/' \
$RPM_BUILD_ROOT%_libdir/speech_tools/config/compilers/gcc_defaults.mak

# Compatibility with past packages

ln -sf speech_tools $RPM_BUILD_ROOT%_includedir/estools
ln -sf speech_tools $RPM_BUILD_ROOT%_includedir/est

SBTM=$RPM_BUILD_ROOT%_man1dir
mkdir -p $SBTM
install -m644 debian/manpage.1 $SBTM/speech-tools.1
gzip -9 $SBTM/speech-tools.1
for f in $S_UNDOC ; do ln -sf speech-tools.1.gz $SBTM/$f.1.gz ; done

# installing debian man pages

install -d $RPM_BUILD_ROOT%_man1dir/

install -m644 debian/ch_track.1 $RPM_BUILD_ROOT%_man1dir/ch_track.1
install -m644 debian/na_play.1 $RPM_BUILD_ROOT%_man1dir/na_play.1
install -m644 debian/na_record.1 $RPM_BUILD_ROOT%_man1dir/na_record.1
install -m644 debian/ch_lab.1 $RPM_BUILD_ROOT%_man1dir/ch_lab.1
install -m644 debian/ch_utt.1 $RPM_BUILD_ROOT%_man1dir/ch_utt.1
install -m644 debian/ch_wave.1 $RPM_BUILD_ROOT%_man1dir/ch_wave.1

# Install Festival


cd $RPM_BUILD_DIR/festival
install -d $RPM_BUILD_ROOT%_bindir

# install binarys

install -D bin/text2wave $RPM_BUILD_ROOT%_bindir/text2wave
install -m 755 bin/festival_server* $RPM_BUILD_ROOT%_bindir/
install -m 755 src/main/festival $RPM_BUILD_ROOT%_bindir
install -m 755 src/main/festival_client $RPM_BUILD_ROOT%_bindir
install -m 755 examples/saytime $RPM_BUILD_ROOT%_bindir/
# install configs
#install -D lib/festival.scm $RPM_BUILD_ROOT%_sysconfdir/festival.scm
%if_with etc_festival_dir
install -m644 -D debian/festival.scm $RPM_BUILD_ROOT%_sysconfdir/festival/siteinit.scm
%else
install -m644 -D debian/festival.scm $RPM_BUILD_ROOT%_sysconfdir/festival.scm
%endif
# server config; loaded directly in init script
install -m644 -D %{SOURCE4} $RPM_BUILD_ROOT%_sysconfdir/festival/server.scm

install -m755 -D %{SOURCE3} $RPM_BUILD_ROOT%_initdir/festival

set `find ./lib/etc -name audsp`
install -D $1 $RPM_BUILD_ROOT%_libdir/festival/audsp

install -d $RPM_BUILD_ROOT%_datadir/emacs/site-lisp
install -m 644 lib/festival.el $RPM_BUILD_ROOT%_datadir/emacs/site-lisp

install -d $RPM_BUILD_ROOT%_datadir/festival/multisyn
install -m 644 lib/*.scm $RPM_BUILD_ROOT%_datadir/festival/
install -m 644 lib/multisyn/*.scm $RPM_BUILD_ROOT%_datadir/festival/multisyn/
#install -m 644 lib/sable-latin.ent $RPM_BUILD_ROOT%_datadir/festival
#install -m 644 lib/Sable.v0_2.dtd $RPM_BUILD_ROOT%_datadir/festival
#install -m 644 lib/scfg_wsj_wp20.gram $RPM_BUILD_ROOT%_datadir/festival
#install -m 644 lib/sec.B.hept.ngrambin $RPM_BUILD_ROOT%_datadir/festival
#install -m 644 lib/sec.ts20.quad.ngrambin $RPM_BUILD_ROOT%_datadir/festival
install -m 644 lib/*.ent $RPM_BUILD_ROOT%_datadir/festival
install -m 644 lib/*.dtd $RPM_BUILD_ROOT%_datadir/festival
install -m 644 lib/*.gram $RPM_BUILD_ROOT%_datadir/festival
install -m 644 lib/*.ngrambin $RPM_BUILD_ROOT%_datadir/festival
install -m 644 lib/*.ngrambin $RPM_BUILD_ROOT%_datadir/festival

# install manpages

install -d $RPM_BUILD_ROOT%_man1dir
install -m 644 doc/*.1 $RPM_BUILD_ROOT%_man1dir
# TODO:
#install -D -m 644 doc/festival.1 $RPM_BUILD_ROOT%_man1dir/festival.1
#install -m 644 doc/festival_client.1 $RPM_BUILD_ROOT%_man1dir/
#install -m 644 doc/text2wave.1 $RPM_BUILD_ROOT%_man1dir/

mkdir $RPM_BUILD_ROOT%{_infodir}
cp -p doc/info/* $RPM_BUILD_ROOT%{_infodir}/

# ALTLinux README

cp %{SOURCE2} .

# Install festival-devel

install -d $RPM_BUILD_ROOT%_includedir/festival
install -m 644 src/include/*.h $RPM_BUILD_ROOT%_includedir/festival/

%if_enabled static
# Install festival-devel-static
install -m 644 src/lib/libFestival.a $RPM_BUILD_ROOT%_libdir/
%endif

# install examples

# preparing hardcoded path to examples (/usr/share/doc/festival/examples)
mkdir -p $RPM_BUILD_ROOT%_datadir/doc
# cleaning examples dir
ln -s %{name}-%{fst_version} $RPM_BUILD_ROOT%_datadir/doc/%{name}
rm -f examples/Makefile examples/songs/Makefile examples/*.sh


# RedHat Fedora festival-1.95 based

#######################################################################
# Fix up the headers to look for other includes where we want them, not
# where they're supposed to be in the source tree
# There is probably a better way to do this, I'm not (yet) a sed expert.
# What this does is, basically, replacing "EST_*.h" with <speech_tools/EST_*.h>.
for i in `find $RPM_BUILD_ROOT%{_includedir}/speech_tools/ -type f \( -name '*.h' -or -name '*.cc' \)` `find $RPM_BUILD_ROOT%{_includedir}/festival/ -type f \( -name '*.h' -or -name '*.cc' \)`; do
 sed \
-e 's,"\(EST.*\.h\)",\<speech_tools/\1\>,g' \
-e 's,"\(siod.*\.h\)",\<speech_tools/\1\>,g' \
-e 's,"\(instantiate/.*\.h\)",\<speech_tools/\1\>,g' \
-e 's,"\(ling_class/.*\.h\)",\<speech_tools/\1\>,g' \
-e 's,"rxp\.h",\<speech_tools/rxp/rxp\.h\>,g' \
-e 's,"\(rxp/.*\.h\)",\<speech_tools/\1\>,g' \
  -e 's,"\(sigpr/.*\.h\)",\<speech_tools/\1\>,g' \
-e 's,"\(unix/.*\.h\)",\<speech_tools/\1\>,g' \
-e 's,"festival\.h",\<festival/festival.h\>,g' \
  -e 's,"ModuleDescription\.h",\<festival/ModuleDescription.h\>,g' \
  -e 's,"Phone\.h",\<festival/Phone.h\>,g' \
     $i >$i-alt
 mv -f $i-alt $i
done

%pre
/usr/sbin/groupadd -r -f %festival_group ||:
grep '^%festival_user:' /etc/passwd >/dev/null || \
/usr/sbin/useradd -g %festival_group -c 'The Festival Speech Synthesizer' \
       -d %festival_home -s /dev/null -r %festival_user ||:

%post
%install_info %name.info

%postun
%uninstall_info %name.info

%post -n libestools%estsuffix
%post_ldconfig

%postun -n libestools%estsuffix
%post_ldconfig

%files
%doc ../festival/{README,ACKNOWLEDGMENTS,COPYING,NEWS}
%doc ../festival/debian/README.Debian
%doc ../festival/README.ALTLinux
%_initdir/festival
%dir %_sysconfdir/festival
%config(noreplace) %_sysconfdir/festival/server.scm
%if_with etc_festival_dir
%config(noreplace) %_sysconfdir/festival/siteinit.scm
#%config(missingok) %_sysconfdir/festival/sitevars.scm
%else
%config(noreplace) %_sysconfdir/festival.scm
#%config(missingok) %_sysconfdir/festivalvars.scm
%endif
# examples
%doc %_datadir/doc/%{name}
%doc ../festival/examples
# end examples
#%_bindir/festival*
%_bindir/festival
%_bindir/festival_client
%if_with legacy_server_scripts
%_bindir/festival_server
%_bindir/festival_server_control
%else
%exclude %_bindir/festival_server
%exclude %_bindir/festival_server_control
%endif
%_bindir/text2wave
%_bindir/saytime
%dir %_libdir/festival/
%dir %_datadir/festival/
%_libdir/festival/audsp
%_datadir/festival/*
%{_infodir}/festival*
%_man1dir/festival*
%_man1dir/text2wave*
%_datadir/emacs/site-lisp/festival.el
#%{_libdir}/*.so.*

%files -n libestools%estsuffix
%if_with est_dynamic_build
%_libdir/libest*.so.*
%endif

%files -n festival-devel
%dir %{_includedir}/festival
%{_includedir}/festival/*
%if_enabled static
%files -n festival-devel-static
%_libdir/libFestival.a
#%else # else not installed
#%exclude %_libdir/libFestival.a
%endif

%files -n libestools-devel
%doc ../speech_tools/README
%_includedir/estools
%_includedir/est
%dir %{_includedir}/speech_tools
%{_includedir}/speech_tools/*
%_libdir/speech_tools/*
%if_with est_dynamic_build
%_libdir/libest*.so
%endif
%if_enabled static
%files -n libestools-devel-static
%_libdir/libest*.a
%else
%exclude %_libdir/libest*.a
%endif

%files -n speech_tools
%doc ../speech_tools/README
%_bindir/[^f]*
%_man1dir/[^f]*.1*
%exclude %_bindir/festival*
%exclude %_bindir/text2wave
%exclude %_bindir/saytime
%exclude %_man1dir/text2wave*


%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin