summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 14d70ff6ed4282813037fd960e259b5b38c684c4 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
# Contributor: erk <v at erk dot io>

pkgname=vnote-git
pkgver=3.18.2.r0.g5e4a6fa7
pkgrel=1
pkgdesc="A Vim-inspired note-taking application, especially for Markdown."
arch=(x86_64 i686 armv7h aarch64)
url='https://vnotex.github.io/vnote/en_us/'
license=(LGPL3)
depends=(qt6-webengine qt6-svg qt6-webchannel qt6-5compat

         # namcap implicit depends
         qt6-base qt6-positioning libglvnd glibc hicolor-icon-theme libx11 libsm libice qt6-declarative gcc-libs libxext
)
makedepends=(git cmake qt6-tools clang lld)
source=("git+https://github.com/vnotex/vnote.git"
        "vnotex-vtextedit::git+https://github.com/vnotex/vtextedit"
        "vnotex-QHotkey::git+https://github.com/vnotex/QHotkey.git"
        "vnotex-syntax-highlighting::git+https://github.com/vnotex/syntax-highlighting"
        "vnotex-hunspell::git+https://github.com/vnotex/hunspell"
        "vnotex-sonnet::git+https://github.com/vnotex/sonnet")
sha256sums=('SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP')

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

prepare() {
  cd "vnote"

  git submodule init
  git config 'submodule.libs/vtextedit.url' "${srcdir}/vnotex-vtextedit"
  git config 'submodule.libs/QHotkey.url' "${srcdir}/vnotex-QHotkey"
  git -c protocol.file.allow=always submodule update

  cd "libs/vtextedit"
  git submodule init
  git config 'submodule.src/libs/syntax-highlighting.url' "${srcdir}/vnotex-syntax-highlighting"
  git config 'submodule.src/libs/hunspell.url' "${srcdir}/vnotex-hunspell"
  git config 'submodule.src/libs/sonnet.url' "${srcdir}/vnotex-sonnet"
  git -c protocol.file.allow=always submodule update
}

build() {
  export CC=/usr/bin/clang CXX=/usr/bin/clang++
  export LD="/usr/bin/lld"
  export LDFLAGS="-fuse-ld=lld"

  cmake -B build -S "vnote" -Wno-dev \
    -DUSE_LD_GOLD=OFF \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr

  cmake --build build
}

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