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

pkgname=media-player-info
pkgver=%version%
pkgrel=%release%
pkgdesc="Data files describing media player capabilities, for post-HAL systems"
arch=('any')
license=('BSD')
url="https://www.freedesktop.org/wiki/Software/media-player-info/"
depends=('systemd')
makedepends=('python' git)
_commit=337c758d95cc37f5a1b7a2a065e2e2cd8a75c4d8  # tags/24^0
source=("git+https://anongit.freedesktop.org/git/media-player-info#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

check() {
  cd $pkgname
  make check
}

build() {
  cd $pkgname

  ./configure --prefix=/usr \
      --with-udevdir=/usr/lib/udev
  LANG="en_US.UTF-8" make
}

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

  install -d "$pkgdir/usr/share/licenses/$pkgname"
  install -m644 COPYING "$pkgdir/usr/share/licenses/$pkgname"
}
