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

pkgname=hype
pkgver=0.1.0
pkgrel=4
pkgdesc='Simple Markdown presentations with a visual slide editor'
arch=('x86_64' 'aarch64')
url='https://github.com/omacom/hype'
license=('MIT')
install='hype.install'
options=('!debug')
depends=(
  'ffmpeg'
  'hicolor-icon-theme'
  'qt6-base>=6.8'
  'qt6-declarative>=6.8'
  'qt6-multimedia'
  'qt6-imageformats'
  'qt6-svg'
  'source-highlight'
  'zlib'
  'libwebp'
  'xdg-desktop-portal'
)
makedepends=('gcc' 'git' 'make')
# Pin the source until a tagged release is available.
_commit=fc9b3baaad0d6ef357e1bd6a97c67d58e733024e
source=("git+$url.git#commit=$_commit")
# makepkg hashes git archive --format tar of the pinned commit.
sha256sums=('f15ac30a3e42ebebbc9d64eac1f1fe6231a5e7366ba25c211bef5e193a912b07')

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

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

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