# Maintainer: Jankees van Woezik <mail@jankeesvw.com>

pkgname=omarchy-meeting-recorder-bin
_name=omarchy-meeting-recorder
pkgver=1.4.0
pkgrel=1
pkgdesc="Meeting Recorder for Omarchy: record the mic and the computer audio, transcribed on your own machine with speakers, chapters and a player"
arch=('x86_64')
url="https://github.com/jankeesvw/omarchy-meeting-recorder"
license=('MIT')
depends=('gtk4' 'libadwaita' 'glib2' 'pango' 'cairo' 'graphene' 'libgcc' 'libstdc++' 'glibc' 'libpulse' 'ffmpeg')
optdepends=('quickshell: the bar widget, part of every Omarchy install'
            'perl-file-mimeinfo: open .meeting-recorder files with xdg-open, not only from Nautilus')
provides=("$_name")
conflicts=("$_name")
install="$_name.install"
options=('!debug')
source_x86_64=("$url/releases/download/v$pkgver/$_name-$pkgver-x86_64-linux.tar.gz")
sha256sums_x86_64=('d8358178d11e01f5a34a69839dfcf497dc193163b489107076cd62b34472c639')

package() {
  cd "$_name-$pkgver"
  install -Dm755 "$_name" "$pkgdir/usr/bin/$_name"
  install -Dm644 "data/$_name.desktop" "$pkgdir/usr/share/applications/$_name.desktop"
  install -Dm644 "data/$_name.xml" "$pkgdir/usr/share/mime/packages/$_name.xml"
  # The bar widget, to link into ~/.config/omarchy/plugins (see the install message).
  install -Dm644 plugin/manifest.json "$pkgdir/usr/share/$_name/plugin/manifest.json"
  install -Dm644 plugin/Widget.qml "$pkgdir/usr/share/$_name/plugin/Widget.qml"
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}
