PKGBUILD 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # Maintainer: David P. <megver83@parabola.nu>
  2. # Maintainer (arch): Jan Alexander Steffens (heftig) <heftig@archlinux.org>
  3. pkgbase=pipewire-media-session
  4. pkgname=(pipewire-media-session pipewire-media-session-docs)
  5. pkgver=0.4.1
  6. pkgrel=2
  7. pkgrel+=.nonsystemd1
  8. epoch=1
  9. pkgdesc="Example session manager for PipeWire"
  10. url="https://gitlab.freedesktop.org/pipewire/media-session"
  11. license=(MIT)
  12. arch=(x86_64)
  13. arch+=(i686 armv7h)
  14. makedepends=(git meson doxygen graphviz 'pipewire>=0.3.39' dbus
  15. alsa-lib)
  16. options=(debug)
  17. _commit=e5d5cf2404786af8bcc40bdb8a2962bef4ec18b6 # tags/0.4.1
  18. source=("$pkgbase::git+https://gitlab.freedesktop.org/pipewire/media-session.git#commit=$_commit")
  19. sha256sums=('SKIP')
  20. pkgver() {
  21. cd $pkgbase
  22. git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
  23. }
  24. prepare() {
  25. cd $pkgbase
  26. }
  27. build() {
  28. local meson_options=(
  29. -D docs=enabled
  30. -D systemd=disabled
  31. -D with-module-sets=[]
  32. )
  33. arch-meson $pkgbase build "${meson_options[@]}"
  34. meson compile -C build
  35. }
  36. check() {
  37. meson test -C build --print-errorlogs
  38. }
  39. _pick() {
  40. local p="$1" f d; shift
  41. for f; do
  42. d="$srcdir/$p/${f#$pkgdir/}"
  43. mkdir -p "$(dirname "$d")"
  44. mv "$f" "$d"
  45. rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
  46. done
  47. }
  48. package_pipewire-media-session() {
  49. depends=('pipewire>=0.3.39' libpipewire-0.3.so libdbus-1.so
  50. libasound.so)
  51. optdepends=('pipewire-media-session-docs: Documentation')
  52. provides=(pipewire-session-manager)
  53. conflicts=(wireplumber)
  54. meson install -C build --destdir "$pkgdir"
  55. _pick docs "$pkgdir"/usr/share/doc
  56. install -Dt "$pkgdir/usr/share/doc/$pkgname" -m644 $pkgbase/{NEWS,README}*
  57. install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 $pkgbase/COPYING
  58. }
  59. package_pipewire-media-session-docs() {
  60. pkgdesc+=" - documentation"
  61. mv docs/* "$pkgdir"
  62. install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 $pkgbase/COPYING
  63. }
  64. # vim:set sw=2 et: