# $Id: PKGBUILD 137074 2015-07-17 19:11:53Z alucryd $$
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

pkgname=ffms2
pkgver=2.21
pkgrel=2
pkgdesc='A libav/ffmpeg based source library and Avisynth plugin for easy frame accurate access'
arch=('i686' 'x86_64')
url='https://github.com/FFMS/ffms2'
license=('GPL')
depends=('ffmpeg')
makedepends=('git')
provides=('vapoursynth-plugin-ffms2'i
          'libffms2.so')
source=("ffms2-${pkgver}.tar.gz::https://github.com/FFMS/ffms2/archive/${pkgver}.tar.gz")
sha256sums=('c2c23ce2254e293376f786aafc20a345f4dc970f5b2efef3fa38e40d7d510202')

build() {
  cd ffms2-${pkgver}

  ./configure \
    --prefix='/usr' \
    --enable-avresample \
    --enable-shared \
    --disable-static
  make
}

package() {
  cd ffms2-${pkgver}

  make DESTDIR="${pkgdir}" install

  install -dm 755 "${pkgdir}"/usr/lib/vapoursynth
  ln -s ../libffms2.so "${pkgdir}"/usr/lib/vapoursynth/
}

# vim: ts=2 sw=2 et:
