# Maintainer: Eric Bélanger <eric@archlinux.org>
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

pkgname=gpac
pkgver=1.0.1
pkgrel=1
epoch=1
pkgdesc='A multimedia framework based on the MPEG-4 Systems standard'
arch=(x86_64)
url=https://gpac.wp.imt.fr/
license=(LGPL)
depends=(
  glibc
  openssl
  xz
  zlib
)
makedepends=(git)
provides=(libgpac.so)
_tag=d8538e8ae946b32d99c6b2c57cbb327146e9cd9d
source=(git+https://github.com/gpac/gpac.git#tag=${_tag})
sha256sums=(SKIP)

pkgver() {
  cd gpac

  git describe --tags | sed 's/^v//'
}

build() {
  cd gpac

  ./configure \
    --prefix=/usr \
    --mandir=/usr/share/man \
    --disable-oss-audio \
    --disable-dvb4linux \
    --disable-qjs \
    --enable-pic \
    --use-js=no
  make
}

package() {
  make DESTDIR="${pkgdir}" STRIP=true -C gpac install
  make DESTDIR="${pkgdir}" STRIP=true -C gpac install-lib
}

# vim: ts=2 sw=2 et:
