# Maintainer: Developer <dev@opalos.org>
# Maintainer: Developer <dev@opalos.org>

pkgname=libdca
pkgver=%version%
pkgrel=%release%
pkgdesc='Library for decoding DTS Coherent Acoustics streams'
arch=('x86_64')
url='https://www.videolan.org/developers/libdca.html'
license=('GPL-2.0-or-later')
depends=('bash' 'glibc')
source=("https://download.videolan.org/pub/videolan/$pkgname/$pkgver/$pkgname-$pkgver.tar.bz2")
sha256sums=('3a0b13815f582c661d2388ffcabc2f1ea82f471783c400f765f2ec6c81065f6a')

prepare() {
  cd $pkgname-$pkgver
  sed -i '/DESTDIR/ s/\.1/.1.gz/g' src/Makefile.am
  sed -i '/libdts.a/d' libdca/Makefile.am
  ./bootstrap
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
