summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7bf479178d7ee50de135e4dff2fe663a76837d15 (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
# Maintainer: xiota / aur.chaotic.cx

_pkgname='geany-plugin-preview'
pkgname="$_pkgname-git"
pkgdesc="Plugin for Geany to preview markdown and other markup languages"
url="https://github.com/xiota/geany-preview"
pkgver=0.2.4.r4.gcf00e5b
pkgrel=1
license=('GPL-3.0-or-later')
arch=('x86_64')

depends=(
  'cmark-gfm'
  'geany'
  'libpodofo.so' # podofo
  'webkit2gtk-4.1'
)
makedepends=(
  'git'
  'meson'
  'tomlplusplus'
)
optdepends=(
  'asciidoctor: For AsciiDoc'
  'pandoc: For many other file formats'
  'ttf-courier-prime: To export Fountain to PDF' # AUR
)

provides=("$_pkgname")
conflicts=("$_pkgname")

options=('!debug' '!lto' '!strip')

_pkgsrc="geany-preview"
source=(
  "$_pkgsrc"::"git+$url.git"
  'git+https://github.com/xiota/ftn2xml.git'
)
sha256sums=(
  'SKIP'
  'SKIP'
)

prepare() {
  ln -sf "$srcdir/ftn2xml" "$_pkgsrc/subprojects/ftn2xml"
}

pkgver() {
  cd "$_pkgsrc"
  git describe --long --tags --abbrev=7 --exclude='*[a-zA-Z][a-zA-Z]*' \
    | sed -E 's/^[^0-9]*//;s/([^-]*-g)/r\1/;s/-/./g'
}

build() {
  printf '%s' "${pkgver/.r/+r}" > "$_pkgsrc/version.txt"

  arch-meson build "$_pkgsrc"
  meson compile -C build
}

package() {
  meson install -C build --destdir "$pkgdir"
}