# Maintainer: astar76
# Built by tools/package.sh from the release tar.gz (TARBALL=file://… for an offline build); it keeps pkgver,
# sha256sums and the glibc floor current.
pkgname=quince-bin
pkgver=0.1.0
pkgrel=1
pkgdesc='Material You video player built on mpv'
arch=('x86_64')
url='https://archlinux.tail7c4f5e.ts.net/git/astar76/Quince'
license=('MIT')
depends=('glibc>=2.35' 'gcc-libs' 'mpv' 'dbus' 'fontconfig' 'libglvnd' 'wayland' 'libxkbcommon' 'libxkbcommon-x11' 'libx11' 'libxcb' 'libxcursor' 'libxi' 'libxrender' 'hicolor-icon-theme')
optdepends=(
    'xdg-desktop-portal: open file and folder dialogs'
    'ffmpeg: preview pictures on the seek bar'
    'yt-dlp: web links'
)
provides=('quince')
conflicts=('quince')
options=('!strip' '!debug')
source=("Quince-$pkgver-Linux-x86_64.tar.gz::${TARBALL:-$url/releases/download/v$pkgver/Quince-$pkgver-Linux-x86_64.tar.gz}")
sha256sums=('c8df595cbf2bcc51c8c9ba61a165ffaf1c18ff8b256ea4e94ed17d98157b338b')

package() {
    cd "$srcdir/quince-$pkgver"
    install -d "$pkgdir/usr"
    for d in bin lib share; do [ ! -d "$d" ] || cp -R "$d" "$pkgdir/usr/"; done
    if [ -d "$pkgdir/usr/share/licenses/quince" ] && [ "$pkgname" != quince ]; then
        mv "$pkgdir/usr/share/licenses/quince" "$pkgdir/usr/share/licenses/$pkgname"
    fi
    install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}
