# Maintainer: David Heinemeier Hansson <david@hey.com>

pkgname=monologue
pkgver=0.1.0
pkgrel=3
pkgdesc='A simple, theme-synced webcam recorder for Omarchy'
arch=('x86_64' 'aarch64')
url='https://github.com/omacom/monologue'
license=('MIT')
install='monologue.install'
options=('!debug')
depends=(
  'ffmpeg'
  'hicolor-icon-theme'
  'libpulse'
  'qt6-base'
  'qt6-declarative'
  'qt6-multimedia>=6.8'
  'xdg-desktop-portal'
)
makedepends=('gcc' 'make' 'pkgconf')
optdepends=('omacut: trim recordings directly from Monologue')
# Pin the published source until a tagged release is available.
_commit=23e0844f60feef2f9d2cf2c9d89f13eb0bf5adef
source=("$pkgname-$_commit.tar.gz::$url/archive/$_commit.tar.gz")
sha256sums=('1a04b9e47b29846e9135d110978f7f35c0274f7361729f0b6ac03796499c0ad6')

build() {
  cd "$srcdir/$pkgname-$_commit"
  ./bin/build
}

package() {
  cd "$srcdir/$pkgname-$_commit"

  install -Dm755 build/monologue "$pkgdir/usr/bin/monologue"
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -Dm644 pkgbuild/monologue.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/monologue.svg"
  install -Dm644 pkgbuild/monologue.desktop "$pkgdir/usr/share/applications/monologue.desktop"
}
