# $Id: PKGBUILD,v 1.3 2007/06/27 15:59:04 simo Exp $ # vim: ft=sh ts=2 sw=2 #Maintainer: Simo Leone #Contributor: Simo Leone pkgname=festival pkgver=1.96beta pkgverorig=1.96-beta pkgrel=1 pkgdesc="Festival is a general multi-lingual speech synthesis system developed at CSTR (Centre for Speech Technology Research)." license="" arch=('i686') url="http://www.cstr.ed.ac.uk/projects/festival/" depends=('perl') source=("http://festvox.org/packed/festival/1.96/$pkgname-$pkgverorig.tar.gz" \ "http://festvox.org/packed/festival/1.96/speech_tools-1.2.96-beta.tar.gz" \ "http://festvox.org/packed/festival/1.96/festlex_POSLEX.tar.gz" \ "http://festvox.org/packed/festival/1.96/festlex_CMU.tar.gz" \ "http://festvox.org/packed/festival/1.96/festlex_OALD.tar.gz" \ "config.diff" "festconfig.diff") build() { export MAKEFLAGS="-j1" ################################################################## #Speech Tools first cd $startdir/src/speech_tools patch -p1 < $startdir/src/config.diff ./configure --prefix=/usr --sysconfdir=/etc make OPTIMISE_CXXFLAGS="${CXXFLAGS}" OPTIMISE_CCFLAGS="${CFLAGS}" || return 1 for i in `grep -l 'EST shared script' bin/*`; do install -D -m755 main/`basename $i` bin; done mkdir -p $startdir/pkg/usr/{bin,lib,include/speech_tools} sed -i -e '66,85d' bin/resynth cp -a bin/* $startdir/pkg/usr/bin cp -a lib/lib*.a lib/lib*.so* $startdir/pkg/usr/lib cp -aR include/* $startdir/pkg/usr/include/speech_tools rm -rf $startdir/pkg/usr/include/speech_tools/win32 rm -rf `find $startdir/pkg -name Makefile` rm -f $startdir/pkg/usr/bin/{est_gdb,est_examples,est_program} ################################################################# # Now Festival itself cd $startdir/src/festival patch -p1 < $startdir/src/festconfig.diff ./configure --prefix=/usr --sysconfdir=/etc make OPTIMISE_CXXFLAGS="${CXXFLAGS}" OPTIMISE_CCFLAGS="${CFLAGS}" #will fail on making scripts for i in `grep -l 'Festival shared script' bin/*`; do cp -a src/main/`basename $i` bin; done sed -i -e '39,61d' bin/festival_server sed -i -e '39,61d' bin/festival_server_control sed -i -e "s#exec $startdir/src/festival/bin/festival#/usr/bin/festival#" bin/text2wave install -D -m755 bin/festival $startdir/pkg/usr/bin install -D -m755 bin/festival_client $startdir/pkg/usr/bin install -D -m755 bin/festival_server $startdir/pkg/usr/bin install -D -m755 bin/festival_server_control $startdir/pkg/usr/bin install -D -m755 bin/text2wave $startdir/pkg/usr/bin install -D -m644 src/lib/libFestival.a $startdir/pkg/usr/lib/libFestival.a mkdir -p $startdir/pkg/usr/man/man1 install -D -m644 doc/festival.1 $startdir/pkg/usr/man/man1 install -D -m644 doc/festival_client.1 $startdir/pkg/usr/man/man1 mkdir -p $startdir/pkg/usr/include/festival cp -aR src/include/* $startdir/pkg/usr/include/festival rm -f $startdir/pkg/usr/include/festival/Makefile mkdir -p $startdir/pkg/usr/share/festival cp -aR lib/* $startdir/pkg/usr/share/festival rm -f `find $startdir/pkg/usr/share/festival -name Makefile` mkdir -p $startdir/pkg/usr/share/festival/voices ################################################################# # Ok now some general cleanups for i in `find $startdir/pkg/usr/include/ -type f`; do sed -i -e 's,"EST.*\.h",\,g' -e 's,speech_tools/\",speech_tools/,g' \ -e 's,"siod.*\.h",\,g' -e 's,speech_tools/\",speech_tools/,g' \ -e 's,"instantiate/.*\.h",\,g' -e 's,speech_tools/instantiate/\",speech_tools/instantiate/,g' -e 's,"instantiate,instantiate,g' \ -e 's,"ling_class/.*\.h",\,g' -e 's,speech_tools/ling_class/\",speech_tools/ling_class/,g' -e 's,"ling_class,ling_class,g'\ -e 's,"rxp/.*\.h",\,g' -e 's,speech_tools/rxp/\",speech_tools/rxp/,g' -e 's,"rxp,rxp,g' \ -e 's,"sigpr/.*\.h",\,g' -e 's,speech_tools/sigpr/\",speech_tools/sigpr/,g' -e 's,"sigpr,sigpr,g' \ -e 's,"unix/.*\.h",\,g' -e 's,speech_tools/unix/\",speech_tools/unix/,g' -e 's,\.h\">,.h\>,g' -e 's,"unix,unix,g' \ -e 's,"festival\.h",\,g' \ -e 's,"ModuleDescription\.h",\,g' \ -e 's,"Phone\.h",\,g' $i done rm -rf `find $startdir/pkg -name Makefile` } md5sums=('74915f4ffb13471c7e529ae92b392453' '887e0c7586facb97cfc0114a105763b2' '742c266e4c4978fae2b5c1bf6f549eb4' '66d39c6f7b8e9d9beade051312365020' '45a03689025849d02ec963a5b338ef37' '84282ca936f34cd15606cf69f74f6b98' 'e174c001bec78a4973bb2f967ca962d1')