# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=srt
pkgver=1.5.4
pkgrel=1
pkgdesc="Secure Reliable Transport library"
url="https://www.srtalliance.org/"
arch=(x86_64)
license=(MPL-2.0)
depends=(
  bash
  gcc-libs
  glibc
  openssl
)
makedepends=(
  cmake
  git
  ninja
)
source=("git+https://github.com/Haivision/srt#tag=v$pkgver")
b2sums=('d0d7be25c29a3ce8ada61d721813a8a5235751dfc0e2fa28072e3b9fb5bc9131da405db0cc5163339ba14bf05ddec1a861ceee749a31c171d61555885921ea39')

prepare() {
  cd srt
}

build() {
  local cmake_options=(
    -DCMAKE_INSTALL_PREFIX=/usr
    -DCMAKE_BUILD_TYPE=None
    -DENABLE_STATIC=OFF
    -DENABLE_TESTING=ON
  )

  cmake -S srt -B build -G Ninja "${cmake_options[@]}"
  cmake --build build
}

check() {
  cd build
  ./uriparser-test
  ./utility-test
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}

# vim:set sw=2 sts=-1 et:
