# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Peter Mattern <pmattern at arcor dot de>

pkgname=feathernotes
pkgver=0.9.0
pkgrel=2
pkgdesc='Lightweight Qt hierarchical notes-manager'
arch=('x86_64')
url='https://github.com/tsujan/FeatherNotes'
license=('GPL3')
depends=('hicolor-icon-theme' 'hunspell' 'qt5-svg' 'qt5-translations' 'qt5-x11extras')
makedepends=('cmake' 'ninja' 'qt5-tools')
source=("https://github.com/tsujan/FeatherNotes/releases/download/V$pkgver/FeatherNotes-$pkgver.tar.xz"{,.asc}
        'feathernotes.appdata.xml')
sha256sums=('09b13be2744f22dfe64f40839ea6a55dcde54bcf350b9b6c2f960c2d05030ea4'
            'SKIP'
            '064e5dbf74cfa4c5932fbe6e516d29f8ed3caf489b30c2a01c71d488ac822ae6')
validpgpkeys=('19DFDF3A579BD509DBB572D8BE793007AD22DF7E')

build() {
  cmake -S FeatherNotes-$pkgver -B build -G Ninja -DCMAKE_INSTALL_PREFIX='/usr'
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
  install -Dm644 $pkgname.appdata.xml "$pkgdir/usr/share/metainfo/$pkgname.appdata.xml"
}
