summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8b20726bb0d5833b2946bfbfc9c6f6621bbc0baf (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Maintainer: Pellegrino Prevete (tallero) <pellegrinoprevete@gmail.com>

_pkgname=devhelp
pkgbase="${_pkgname}-git"
pkgname=(
  "${pkgbase}"
  "${_pkgname}-docs-git"
)
pkgver=43.0+9+g4d15da51
pkgrel=1
pkgdesc="API documentation browser for GNOME"
url="https://wiki.gnome.org/Apps/Devhelp"
arch=(
  x86_64
  i686
  pentium4
  aarch64
  armv7h
)
license=(GPL)
depends=(
  webkit2gtk-4.1
)
makedepends=(
  appstream-glib
  git
  gi-docgen
  gobject-introspection
  meson
  yelp-tools
)
provides=("${_pkgname}=${pkgver}")
conflicts=("${_pkgname}")
source=("git+https://gitlab.gnome.org/GNOME/${_pkgname}.git")
sha512sums=('SKIP')

pkgver() {
  cd "${_pkgname}"
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd "${_pkgname}"
}

build() {
  local meson_options=(
    -D gtk_doc=true
    -D plugin_emacs=true
    -D plugin_gedit=true
    -D plugin_vim=true
  )
  arch-meson "${_pkgname}" build "${meson_options[@]}"
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package_devhelp-git() {
  groups=(
    gnome-extra
    gnome-extra-git
  )
  meson install -C build --destdir "${pkgdir}"

  # Split -docs
  mkdir -p docs/usr/share
  mv -t docs/usr/share "$pkgdir"/usr/share/doc
}

package_devhelp-docs-git() {
  pkgdesc+=" (documentation)"
  depends=()

  mv -t "$pkgdir" docs/*
}

# vim:set sw=2 sts=-1 et: