summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3b2fbe96cd9b88bf6cdcb6bd7ec3758e5c9727ac (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
# Maintainer: Pellegrino Prevete <pellegrinoprevete@gmail.com>
# Contributor: Igor Dyatlov <dyatlov.igor@protonmail.com>

_pkgbase="d-spy"
pkgbase="${_pkgbase}-git"
pkgname=(
  "${pkgbase}"
  'libdspy-git'
)
pkgver=1.6.0.r4.g3d393d9
pkgrel=1
pkgdesc='A D-Bus explorer for GNOME'
arch=('x86_64')
url="https://gitlab.gnome.org/GNOME/${_pkgbase}"
license=('GPL3')
makedepends=('meson')
checkdepends=('appstream-glib')
source=("git+${url}.git")
b2sums=('SKIP')

pkgver() {
  cd "${_pkgbase}"
  ( set -o pipefail
    git describe --long 2>/dev/null \
    | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
      printf "r%s.%s" "$(git rev-list --count HEAD)" \
                      "$(git rev-parse --short HEAD)"
  )
}

build() {
  arch-meson "${_pkgbase}" build
  meson compile -C build
}

check() {
  meson test -C build || :
}

_pick() {
  local p="$1" f d; shift
  for f; do
    d="$srcdir/$p/${f#$pkgdir/}"
    mkdir -p "$(dirname "$d")"
    mv "$f" "$d"
    rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
  done
}

package_d-spy-git() {
  depends=(
    'libadwaita'
    'libdspy'
  )
  provides=(
    "${_pkgbase}=${pkgver}")
  conflicts=(
    "${_pkgbase}")
  
  meson install -C build --destdir "${pkgdir}"
  cd "${pkgdir}"
  _pick library usr/include usr/lib
}

package_libdspy-git() {
  pkgdesc='D-Spy library for IDE integration'
  license=(
    'LGPL3')
  depends=(
    'glib2')
  provides=(
    "libdspy=${pkgver}")
  conflicts=(
    "libdspy")
  
  mv library/* "${pkgdir}"
}