# SliTaz package receipt.

PACKAGE="espeak"
VERSION="1.45.05"
CATEGORY="misc"
SHORT_DESC="Speech synthesizer."
MAINTAINER="erjo@slitaz.org"
DEPENDS="portaudio jack-audio-connection-kit"
BUILD_DEPENDS="$DEPENDS portaudio-dev jack-audio-connection-kit-dev"
TARBALL="$PACKAGE-$VERSION-source.zip"
WEB_SITE="http://espeak.sourceforge.net/"
WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
TAGS="speech synthesis"

# Rules to configure and make the package.
compile_rules()
{
	[ -d $src-source ] && mv $src-source $PACKAGE-$VERSION 2>/dev/null
	cd $src/src
	
	# Using portaudio v19
	cp portaudio19.h portaudio.h
	
	make && make DESTDIR=$src/_pkg install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	
	mkdir -p $fs/usr/lib
	cp -a $_pkg/usr/bin $fs/usr
	cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
	cp -a $_pkg/usr/share $fs/usr
	
	# Make symlink
	#cd $fs/usr/lib
	#ln -s libespeak.so.1.1.42 libespeak.so.1
}