# Contributor: Michael Hanson <hansonorders@verizon.net>
# Maintainer: Michael Hanson <hansonorders@verizon.net>
pkgname=fuzemux-svn
pkgver=11
pkgrel=1
pkgdesc="A tool to remux AVI video files for the San Disk Sansa Fuze portable media player"
arch=('i686' 'x86_64')
url="http://code.google.com/p/fuzemux"
license=('GPL3')
#depends=()
makedepends=('subversion' 'autoconf')
provides=('fuzemux')
install=('fuzemux-svn.install')

_svntrunk=http://fuzemux.googlecode.com/svn/trunk/
_svnmod=fuzemux

build() {
  cd "$srcdir"

  if [ -d $_svnmod/.svn ]; then
    (cd $_svnmod && svn up -r $pkgver)
  else
    svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
  fi

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

  rm -rf "$srcdir/$_svnmod-build"
  cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
  cd "$srcdir/$_svnmod-build"

  #
  # BUILD
  #
  /usr/bin/autoreconf --install
  ./configure --prefix=/usr
  make || return 1
  make DESTDIR="$pkgdir/" install
}
md5sums=()