summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e9581fe4d99851ac2ecd911b32c77225a11b442b (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
40
41
42
43
44
45
46
47
# Maintainer: Morgenstern <charles [at] charlesbwise [dot] com>

pkgname=cherrytree-git
pkgver=1.1.2.r5.g4db6074c
pkgrel=1
pkgdesc="Hierarchical note-taking application, git version"
arch=('x86_64')
url="https://github.com/giuspen/${pkgname%%-git}"
license=('GPL-3.0-or-later')
depends=('fmt'
         'gspell'
         'gtksourceviewmm'
         'libxml++2.6'
         'uchardet'
         'vte3')
makedepends=('cmake'
             'git'
             'python'
             'spdlog')
checkdepends=('gtest')
provides=("${pkgname%%-git}")
conflicts=("${pkgname%%-git}")
source=("git+https://github.com/giuspen/${pkgname%%-git}.git")
sha512sums=('SKIP')

pkgver() {
  cd "${pkgname%%-git}"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//g'
}

build() {
  cmake \
    -B "${pkgname%%-git}/build" \
    -S "${pkgname%%-git}" \
    -DAUTO_RUN_TESTING:BOOL='OFF' \
    -DUSE_SHARED_GTEST_GMOCK:BOOL='ON' \
    -Wno-dev
  make -C "${pkgname%%-git}/build"
}

check() {
  ./"${pkgname%%-git}/build/run_tests_no_x"
}

package() {
  make -C "${pkgname%%-git}/build" DESTDIR="${pkgdir}" install
}