# Maintainer:
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Adrià Arrufat <swiftscythe@gmail.com>
# Contributor: Mark Lee <mark@markelee.com>

pkgname=mediastreamer
pkgver=5.0.26
pkgrel=1
pkgdesc='A library written in C that allows you to create and run audio and video streams'
arch=(x86_64)
url='https://github.com/BelledonneCommunications/mediastreamer2'
license=(GPL)
depends=(ortp ffmpeg bzrtp glew libsrtp)
makedepends=(cmake python bcunit doxygen)
source=(https://github.com/BelledonneCommunications/mediastreamer2/archive/$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('fbbbcc51013bd8e60534093644097756a991d5282df988f926e142f3e3e169d2')
validpgpkeys=('9774BC1725758EB16D639F8B3ECD52DEE2F56985')

build() {
  cmake -B build -S ${pkgname}2-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DENABLE_STATIC=OFF \
    -DENABLE_STRICT=OFF
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
  rm -r "$pkgdir"/usr/include/OpenGL
}
