summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c4492c2f7bb0ef8bcd254118d1366e8681255d70 (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
101
102
103
104
105
106
107
108
109
110
111
112
113
# Maintainer: Ferdinand Bachmann <ferdinand.bachmann@yrlf.at>
# Contributor: David Runge <dvzrv@archlinux.org>
# Contributor: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

## links
# https://pipewire.pages.freedesktop.org/wireplumber
# https://gitlab.freedesktop.org/pipewire/wireplumber

_pkgbase=wireplumber
pkgbase=wireplumber-git
pkgname=(
  wireplumber-git
  libwireplumber-git
)
pkgver=0.5.4.r0.gdc6694f
pkgrel=1
pkgdesc="Session / policy manager implementation for PipeWire"
url="https://gitlab.freedesktop.org/pipewire/wireplumber"
arch=(x86_64)
license=(MIT)
makedepends=(
  doxygen
  git
  glib2-devel
  gobject-introspection
  graphviz
  lua
  meson
  pipewire
  python-lxml
  systemd
)
checkdepends=(pipewire-audio)
source=("git+https://gitlab.freedesktop.org/pipewire/wireplumber.git")
b2sums=('SKIP')

pkgver() {
  cd $_pkgbase
  git describe --tags --long --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd $_pkgbase
}

build() {
  local meson_options=(
    -D doc=disabled
    -D elogind=disabled
    -D system-lua=true
  )

  arch-meson $_pkgbase build "${meson_options[@]}"
  meson compile -C build
}

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

_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
}

_ver=0.5

package_wireplumber-git() {
  depends=(
    "libwireplumber-git=$pkgver-$pkgrel"
    libsystemd.so
    lua
    pipewire
  )
  provides=(pipewire-session-manager "wireplumber=$pkgver")
  conflicts=(pipewire-media-session wireplumber)
  install=wireplumber.install

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

  (
    cd "$pkgdir"

    _pick libw usr/lib/libwireplumber-$_ver.so*
    _pick libw usr/lib/girepository-1.0
    _pick libw usr/lib/pkgconfig
    _pick libw usr/include
    _pick libw usr/share/gir-1.0
  )

  install -Dt "$pkgdir/usr/share/doc/$pkgname" -m644 $_pkgbase/{NEWS,README}*
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 $_pkgbase/LICENSE
}

package_libwireplumber-git() {
  pkgdesc+=" - client library"
  depends=(
    libg{lib,module,object,io}-2.0.so
    libpipewire-0.3.so
  )
  provides=(libwireplumber-$_ver.so "libwireplumber=$pkgver")
  conflicts=(libwireplumber)

  mv libw/* "$pkgdir"

  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 $_pkgbase/LICENSE
}