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

pkgname=libmpeg2
pkgver=%version%
pkgrel=%release%
pkgdesc='Library for decoding MPEG-1 and MPEG-2 video streams'
arch=('x86_64')
url='https://libmpeg2.sourceforge.io/'
license=('GPL-2.0-or-later')
depends=('glibc')
makedepends=('libxv' 'sdl')
optdepends=('libxv: mpeg2dec command'
            'sdl: mpeg2dec command')
source=("https://libmpeg2.sourceforge.io/files/$pkgname-$pkgver.tar.gz")
sha256sums=('dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4')

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

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