PKGBUILD 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. # Maintainer: David P. <megver83@parabola.nu>
  2. # Maintainer (Arch): Jan Alexander Steffens (heftig) <heftig@archlinux.org>
  3. # Contributor (Arch): Jan de Groot <jgc@archlinux.org>
  4. pkgbase=pipewire
  5. pkgname=(pipewire alsa-card-profiles pipewire-docs pipewire-media-session
  6. pipewire-alsa pipewire-jack pipewire-pulse gst-plugin-pipewire)
  7. pkgver=0.3.25
  8. pkgrel=1
  9. pkgrel+=.nonsystemd1
  10. epoch=1
  11. pkgdesc="Low-latency audio/video router and processor"
  12. url="https://pipewire.org"
  13. license=(LGPL)
  14. arch=(x86_64)
  15. arch+=(i686 armv7h)
  16. makedepends=(git meson doxygen graphviz xmltoman valgrind libpulse alsa-lib
  17. gst-plugins-base rtkit dbus sdl2 ncurses libsndfile bluez-libs sbc
  18. libldac libopenaptx libfdk-aac vulkan-headers vulkan-icd-loader)
  19. checkdepends=(desktop-file-utils)
  20. _commit=c324107211718043553337cb10d022fe9d2d12d8 # tags/0.3.25
  21. source=("git+https://gitlab.freedesktop.org/pipewire/pipewire.git#commit=$_commit")
  22. sha256sums=('SKIP')
  23. pkgver() {
  24. cd $pkgbase
  25. git describe --tags | sed 's/-/+/g'
  26. }
  27. prepare() {
  28. cd $pkgbase
  29. }
  30. build() {
  31. arch-meson $pkgbase build \
  32. -D docs=enabled \
  33. -D systemd=disabled \
  34. -D jack=disabled \
  35. -D libcamera=disabled \
  36. -D udevrulesdir=/usr/lib/udev/rules.d
  37. meson compile -C build
  38. }
  39. check() {
  40. meson test -C build --print-errorlogs
  41. }
  42. _pick() {
  43. local p="$1" f d; shift
  44. for f; do
  45. d="$srcdir/$p/${f#$pkgdir/}"
  46. mkdir -p "$(dirname "$d")"
  47. mv "$f" "$d"
  48. rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
  49. done
  50. }
  51. _ver=${pkgver:0:3}
  52. package_pipewire() {
  53. depends=(rtkit alsa-card-profiles libdbus-1.so libncursesw.so libsndfile.so
  54. libudev.so libasound.so libbluetooth.so libsbc.so
  55. libldacBT_enc.so libopenaptx.so libfdk-aac.so libvulkan.so)
  56. optdepends=('pipewire-docs: Documentation'
  57. 'pipewire-media-session: Default session manager'
  58. 'pipewire-alsa: ALSA configuration'
  59. 'pipewire-jack: JACK support'
  60. 'pipewire-pulse: PulseAudio replacement'
  61. 'gst-plugin-pipewire: GStreamer support')
  62. provides=(libpipewire-$_ver.so)
  63. backup=(etc/pipewire/{pipewire{,-pulse},client{,-rt}}.conf)
  64. DESTDIR="$pkgdir" meson install -C build
  65. cd "$pkgdir"
  66. _pick acp usr/lib/udev
  67. _pick acp usr/share/alsa-card-profile
  68. _pick docs usr/share/doc
  69. _pick pms etc/pipewire/media-session.d/*.conf
  70. _pick pms usr/bin/pipewire-media-session
  71. _pick jack etc/pipewire/{jack.conf,media-session.d/with-jack}
  72. _pick jack usr/bin/pw-jack usr/lib/pipewire-$_ver/jack
  73. _pick jack usr/share/man/man1/pw-jack.1
  74. _pick pulse etc/pipewire/media-session.d/with-pulseaudio
  75. _pick gst usr/lib/gstreamer-1.0
  76. }
  77. package_alsa-card-profiles() {
  78. pkgdesc+=" - ALSA card profiles"
  79. mv acp/* "$pkgdir"
  80. }
  81. package_pipewire-docs() {
  82. pkgdesc+=" - documentation"
  83. mv docs/* "$pkgdir"
  84. }
  85. package_pipewire-media-session() {
  86. pkgdesc+=" - Session manager"
  87. depends=(pipewire libpipewire-$_ver.so)
  88. backup=(etc/pipewire/media-session.d/media-session.conf
  89. etc/pipewire/media-session.d/{alsa,bluez,v4l2}-monitor.conf)
  90. mv pms/* "$pkgdir"
  91. }
  92. package_pipewire-alsa() {
  93. pkgdesc+=" - ALSA configuration"
  94. depends=(pipewire-media-session)
  95. provides=(pulseaudio-alsa)
  96. mkdir -p "$pkgdir/etc/alsa/conf.d"
  97. ln -st "$pkgdir/etc/alsa/conf.d" \
  98. /usr/share/alsa/alsa.conf.d/{50-pipewire,99-pipewire-default}.conf
  99. install -Dm644 /dev/null "$pkgdir/etc/pipewire/media-session.d/with-alsa"
  100. }
  101. package_pipewire-jack() {
  102. pkgdesc+=" - JACK support"
  103. depends=(pipewire-media-session libpipewire-$_ver.so)
  104. backup=(etc/pipewire/jack.conf)
  105. mv jack/* "$pkgdir"
  106. }
  107. package_pipewire-pulse() {
  108. pkgdesc+=" - PulseAudio replacement"
  109. depends=(pipewire-media-session libpulse)
  110. provides=(pulseaudio pulseaudio-bluetooth)
  111. conflicts=(pulseaudio pulseaudio-bluetooth)
  112. mv pulse/* "$pkgdir"
  113. }
  114. package_gst-plugin-pipewire() {
  115. pkgdesc="Multimedia graph framework - pipewire plugin"
  116. depends=(pipewire-media-session libpipewire-$_ver.so gst-plugins-base-libs)
  117. mv gst/* "$pkgdir"
  118. }
  119. # vim:set sw=2 et: