# Maintainer: Dan B <unknown@cryptoconspiracy.io>
pkgname=lili-crash
pkgver=0.6.1
pkgrel=1
pkgdesc="Find out why a program closed by itself: crash notifications with a one-click AI diagnosis"
arch=('any')
url="https://github.com/cryptoconspiracy/lili-crash"
license=('MIT')
depends=('python' 'systemd' 'libnotify' 'xdg-utils' 'pyside6' 'qt6-svg')
makedepends=('gettext')
optdepends=('plasma-workspace: the panel widget with AI usage and crash history'
            'libayatana-appindicator: the tray icon on desktops other than KDE Plasma'
            'python-gobject: the tray icon on desktops other than KDE Plasma'
            'konsole: a terminal for the diagnosis')
install=lili-crash.install
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('002fa60eb5c6363e3fafda53d94ccf2d0ed67a1306522a26952ea9021e8f4ecf')

build() {
  cd "$pkgname-$pkgver"
  make locales
}

check() {
  cd "$pkgname-$pkgver"
  make check
}

package() {
  cd "$pkgname-$pkgver"
  make PREFIX=/usr DESTDIR="$pkgdir" install
}
