# Maintainer: Kyle <kyle@gmx.ca>
pkgname=svox-pico-git
pkgver=20110301
pkgrel=1
pkgdesc="Small footprint text-to-speech engine"
arch=('i686' 'x86_64')
url="http://android.git.kernel.org/?p=platform/external/svox.git;a=summary"
license=('APACHE')
groups=()
makedepends=('git')
optdepends=('speech-dispatcher-git: for use in text-to-speech applications')

_gitroot="git://git.debian.org/collab-maint/svox.git"
_gitname="svox-pico"

build() {
  cd "$srcdir"
  msg "Connecting to GIT server...."

  if [ -d $_gitname ] ; then
    cd $_gitname && git pull origin
    msg "The local files are updated."
  else
    git clone -b upstream+patches $_gitroot $_gitname
  fi

  msg "GIT checkout done or server timeout"
  msg "Starting make..."

  rm -rf "$srcdir/$_gitname-build"
  git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  cd "$srcdir/$_gitname-build/pico"

  #
  # BUILD HERE
  #

  ./autogen.sh
  ./configure --prefix=/usr
  make
}

package() {
  cd "$srcdir/$_gitname-build/pico"
  make DESTDIR="$pkgdir/" install
} 
