# Maintainer: DrZaius <lou[at]fakeoutdoorsman.com>

pkgname=ffmpeg-git
pkgver=r61490.25bcf24
pkgrel=1
pkgdesc="Universal multimedia toolkit"
arch=('i686' 'x86_64')
license=('GPL')
url="http://ffmpeg.org/"
license=('GPL')
#depends=('alsa-lib' 'bzip2' 'freetype2' 'lame' 'libass' 'libfdk-aac-git' 'libtheora' 'libva' 'libvdpau' 'libvorbis' 'libvpx-git' 'opus' 'sdl' 'texi2html' 'x264-git' 'x265-hg' 'zlib')
depends=('alsa-lib' 'bzip2' 'freetype2'  'zlib')
makedepends=('git' 'yasm')
conflicts=('ffmpeg')
provides=("ffmpeg=$pkgver" "qt-faststart")
source=("$pkgname"::'git://source.ffmpeg.org/ffmpeg.git')
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/$pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir/$pkgname"

  ./configure \
		--prefix=/usr \
		--disable-ffserver \
		--disable-outdev=oss,caca \
		--disable-debug \
		--enable-shared 
#		${APPEND}

#		--disable-static \
#		--enable-gpl \
#		--enable-version3 \
#		--enable-shared \
#		--enable-libxvid \
#		--enable-libvorbis \
#		--enable-libtheora \
#		--enable-postproc \

x(){
    --prefix=/usr \
    --disable-static \
    --enable-gpl \
    --enable-libass \
    --enable-libfdk-aac \
    --enable-libfreetype \
    --enable-libmp3lame \
    --enable-libopus \
    --enable-libtheora \
    --enable-libvorbis \
    --enable-libvpx \
    --enable-libx264 \
    --enable-libx265 \
    --enable-nonfree \
    --enable-shared \
    --enable-x11grab
}
  make
  make tools/qt-faststart
  #make doc
}

package() {
  cd "$srcdir/$pkgname"
  make DESTDIR="$pkgdir" install install-man
  install -D -m755 tools/qt-faststart "$pkgdir/usr/bin/qt-faststart"
}
