# Maintainer: Dimitris Tzemos # modified by Didier Spaier # The symlinks in doinst allow espeak-ng to act as a replacement of # The legacy espeak when running espeakup that rely on it. # note to self: # Run make-git-tarball.sh first # rubygem-ronn and its dependencies: # rubygem-hpricot,rubygem-mustache,rubygem-rdiscount # are needed to build the doc in html and man format using the ronn # application. pkgname=espeak-ng pkgver=git29e621c2 pkgrel=1slint source=("${pkgname}-${pkgver}.tar.xz" "README.mbrola" "list_of_mbrola_voices" "list-espeak-ng-voices") docs=("CHANGELOG.html" "COPYING" "COPYING.APACHE" "COPYING.BSD2" "FAQ" "NEWS" "README.mbrola" "list_of_mbrola_voices") options=("nosrcpack") url=http://espeak.sourceforge.net/ slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "espeak-ng (Next Generation Text-to-Speech program)" "open source speech synthesizer supporting 100 languages and accents." "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." "" "HomePage:https://github.com/rhdunn/espeak/" ) build() { cd $startdir/src/${pkgname}-$pkgver ( cd src ronn *ronn ) ./autogen.sh ./configure \ --with-extdict-ru \ --with-extdict-cmn \ --with-extdict-yue \ --with-klatt \ --with-speechplayer \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} # for i in $(<$startdir/patches/series); do # echo "patching from $startdir/patches/$i" # patch -p1 --verbose < $startdir/patches/$i # sleep 2 make make install DESTDIR=$startdir/pkg PKG2="$startdir/pkgvariants/usr/share/espeak-ng-data/voices/" rm -rf $PKG2 mkdir -p $PKG2 mv $PKG/usr/share/espeak-ng-data/voices/'!v' $PKG2/ || exit 1 PRGNAM=espeak-ng-variants VERSION=$pkgver ARCH=noarch BUILD=$pkgrel OUTPUT=$(cd $startdir && cd .. && cd espeak-ng-variants && pwd) cd $startdir/pkgvariants || exit 1 mkdir install echo "espeak-ng-variants (Voice variants for espeak-ng)" > install/slack-desc /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD.txz cd - mkdir -p $PKG/usr/bin cp $startdir/list-espeak-ng-voices $PKG/usr/bin chmod 755 $PKG/usr/bin/list-espeak-ng-voices DOCSDIR=$startdir/pkg/usr/doc/${pkgname}-$pkgver mkdir -p $DOCSDIR pandoc -s README.md > $DOCSDIR/README.html pandoc -s CHANGELOG.md > $DOCSDIR/CHANGELOG.html cp src/*.html $DOCSDIR cd docs for i in $(find -name "*.md"); do pandoc -s $i > ${i%.md}.html 2> /dev/null if [ "$(echo $i|grep dictionary.md)" = "" ]; then rm $i fi done cp -r * $DOCSDIR cd $DOCSDIR sed "s,src/espeak-ng.1.ronn,espeak-ng.1.html,;s,src/speak-ng.1.ronn,speak-ng.1.html," README.html > bof mv bof README.html for i in $(ls *.html); do sed "s\.md.htmlg;s\.\./../${pkgname}-$pkgver/" $i > bof mv bof $i done }