summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2f7acaed511e42d866029d5507ea52c993ad4a8d (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Maintainer: Alexander Epaneshnikov <alex19ep@archlinux.org>
# Contributor: Vincent Grande <shoober420@gmail.com>
# Contributor: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgbase=at-spi2-core-git
pkgname=(
  at-spi2-core-git
  at-spi2-core-docs-git
)
pkgver=2.52.0.r13.g13be6f0ed
pkgrel=1
pkgdesc="Protocol definitions and daemon for D-Bus at-spi"
url="https://gitlab.gnome.org/GNOME/at-spi2-core"
arch=(x86_64)
license=(GPL2)
depends=(
  dbus
  glib2
  gsettings-desktop-schemas
  libx11
  libxml2
  libxtst
  systemd
  xorg-xprop
)
makedepends=(
  dbus-broker
  gi-docgen
  git
  gobject-introspection
  glib2-devel
  meson
  python-sphinx
)
checkdepends=(
  at-spi2-core
)
source=(${pkgname%-git}::"git+https://gitlab.gnome.org/GNOME/at-spi2-core.git")
b2sums=('SKIP')

pkgver() {
  cd at-spi2-core
  git describe --long | sed 's/^AT_SPI2_CORE_//;s/\([^-]*-g\)/r\1/;s/_/-/g;s/-/./g'
}

prepare() {
  cd at-spi2-core
}

build() {
  local meson_options=(
    -D default_bus=dbus-broker
    -D docs=true
  )

  arch-meson at-spi2-core build "${meson_options[@]}"
  meson compile -C build
}

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

package_at-spi2-core-git() {
  optdepends=('dbus-broker: Alternative bus implementation')
  provides=(
    "${pkgname%-git}"
    "at-spi2-atk=$pkgver-$pkgrel"
    "atk=$pkgver-$pkgrel"
    libatk-1.0.so
    libatk-bridge-2.0.so
    libatspi.so
  )
  conflicts=(
    "${pkgname%-git}"
    'at-spi2-atk<=2.38.0-2'
    'atk<=2.38.0-2'
  )
  replaces=(
    'at-spi2-atk<=2.38.0-2'
    'atk<=2.38.0-2'
  )

  meson install -C build --destdir "$pkgdir"

  mkdir -p doc/usr/share
  mv {"$pkgdir",doc}/usr/share/doc
}

package_at-spi2-core-docs-git() {
  pkgdesc+=" (documentation)"
  provides=("${pkgname%-git}")
  conflicts=("${pkgname%-git}")
  depends=()

  mv doc/* "$pkgdir"
}

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