summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c9b8494d21a4f2bc2ff9a8a26f86c5e95d1c39ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Maintainer: zan <zan@420blaze.it>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=sonnet-git
_name=${pkgname%-git}
pkgver=v5.72.0.541.4cf1502
pkgrel=1
pkgdesc='Spelling framework for Qt'
arch=(x86_64)
url='https://invent.kde.org/frameworks/sonnet'
license=(LGPL)
depends=('qt5-base')
makedepends=(extra-cmake-modules qt5-tools hunspell aspell hspell git libvoikko)
optdepends=('hunspell: spell checking via hunspell'
	    'aspell: spell checking via aspell'
	    'hspell: spell checking for Hebrew'
	    'libvoikko: spell checking for Finnish via Voikko')
groups=(kf5)
conflicts=(sonnet)
provides=(sonnet)
source=('git+https://invent.kde.org/frameworks/sonnet.git')
md5sums=('SKIP')

pkgver() {
  cd $_name
  # Tags are messed up, commiterdate is oldest first while taggerdate is accurate
  refcount=$(git rev-list HEAD --count)
  git for-each-ref refs/tags --sort=-taggerdate --format="%(refname:short)-$refcount-%(objectname:short)" --count=1 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cmake -B build -S $_name
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}