mirror of
https://abf.rosa.ru/djam/pipewire.git
synced 2025-02-23 15:42:55 +00:00
484 lines
14 KiB
RPMSpec
484 lines
14 KiB
RPMSpec
# For spec-helper
|
|
%define dont_remove_rpath 1
|
|
|
|
%define api 0.3
|
|
%define spa_api 0.2
|
|
%define major 0
|
|
%define libname %mklibname %{name} %{api} %{major}
|
|
%define devname %mklibname %{name} -d
|
|
|
|
# Some packages depend from "pulseaudio" or "jack",
|
|
# satisfy such dependencies but be sure to prive a much lower version
|
|
# to avoid taking priority over real pulseaudio or jack when
|
|
# version of PipeWire becomes higher.
|
|
%define fake_version 0.%{version}.fake
|
|
|
|
# (mikhailnov) rosa-repos-pkgprefs (rosa-repos SRPM) makes dependency solvers
|
|
# prefer real jack libraries over these ones.
|
|
# We do NOT filter provides from %%_libdir/*/ (Fedora does filter them)
|
|
# because we have preferences set in rosa-repos-pkgprefs and pull
|
|
# /etc/ld.so.conf.d/*.conf configs if jack libraries from pipewire are installed.
|
|
%define libjack %mklibname jack_pipewire 0
|
|
%define libjacknet %mklibname jacknet_pipewire 0
|
|
%define libjackserver %mklibname jackserver_pipewire 0
|
|
|
|
# (mikhailnov) If someone needs both 32 and 64 bit pipewire-jack or pipewire-alsa,
|
|
# dnf will allow him to run:
|
|
# dnf install 'pipewire-jack(x86-64)' 'pipewire-jack(x86-32)'
|
|
# RPM file coloring will do the magic of dealing with same files in both packages.
|
|
# I do not see sense in inventing strange subpackages to avoid this.
|
|
|
|
# Do not process tons of files by typelib() generatir
|
|
# XXX Paths in typelib() generator must be fixed
|
|
%global __requires_exclude_from %{_datadir}/doc
|
|
%global __provides_exclude_from %{_datadir}/doc
|
|
|
|
Summary: Media Sharing Server
|
|
Name: pipewire
|
|
Version: 1.2.3
|
|
Release: 1
|
|
License: MIT
|
|
Group: Sound
|
|
Url: https://pipewire.org/
|
|
Source0: https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/%{version}/pipewire-%{version}.tar.gz
|
|
Source1: %{name}.sysusers.conf
|
|
BuildRequires: doxygen
|
|
BuildRequires: graphviz
|
|
BuildRequires: meson
|
|
BuildRequires: xmltoman
|
|
BuildRequires: python3-docutils
|
|
BuildRequires: pkgconfig(alsa)
|
|
BuildRequires: pkgconfig(libusb-1.0)
|
|
BuildRequires: pkgconfig(avahi-client)
|
|
BuildRequires: pkgconfig(bluez)
|
|
BuildRequires: pkgconfig(dbus-1)
|
|
BuildRequires: pkgconfig(gio-unix-2.0)
|
|
BuildRequires: pkgconfig(glib-2.0)
|
|
BuildRequires: pkgconfig(gstreamer-1.0)
|
|
BuildRequires: pkgconfig(gstreamer-allocators-1.0)
|
|
BuildRequires: pkgconfig(gstreamer-base-1.0)
|
|
BuildRequires: pkgconfig(gstreamer-net-1.0)
|
|
BuildRequires: pkgconfig(gstreamer-plugins-base-1.0)
|
|
BuildRequires: pkgconfig(jack)
|
|
BuildRequires: pkgconfig(fdk-aac)
|
|
%ifnarch %e2k riscv64
|
|
BuildRequires: roc-toolkit-devel
|
|
%endif
|
|
%ifnarch %e2k
|
|
BuildRequires: pkgconfig(libcamera)
|
|
BuildRequires: pkgconfig(libunwind)
|
|
%endif
|
|
BuildRequires: pkgconfig(libcanberra)
|
|
BuildRequires: pkgconfig(libdrm)
|
|
BuildRequires: pkgconfig(libavcodec)
|
|
BuildRequires: pkgconfig(libmysofa)
|
|
BuildRequires: pkgconfig(libva)
|
|
BuildRequires: pkgconfig(libpulse)
|
|
BuildRequires: pkgconfig(libudev)
|
|
BuildRequires: pkgconfig(libv4l2)
|
|
BuildRequires: pkgconfig(openssl3.3)
|
|
BuildRequires: pkgconfig(readline)
|
|
BuildRequires: pkgconfig(sbc)
|
|
BuildRequires: pkgconfig(sdl2)
|
|
BuildRequires: pkgconfig(systemd)
|
|
BuildRequires: pkgconfig(vulkan)
|
|
BuildRequires: pkgconfig(ncurses)
|
|
BuildRequires: pkgconfig(opus)
|
|
BuildRequires: lc3-devel
|
|
BuildRequires: pkgconfig(libffado)
|
|
BuildRequires: pkgconfig(libfreeaptx)
|
|
#BuildRequires: libldac-devel
|
|
BuildRequires: pkgconfig(ldacBT-enc)
|
|
BuildRequires: lilv-devel
|
|
BuildRequires: sndfile-devel
|
|
BuildRequires: speexdsp-devel
|
|
BuildRequires: sox-devel
|
|
BuildRequires: openfec-devel
|
|
BuildRequires: python38-devel
|
|
# to render text in pictures inside devel docs
|
|
BuildRequires: fonts-ttf-freefont
|
|
Requires: %{libname} = %{EVRD}
|
|
Requires: rtkit
|
|
# There are multiple implementations of media session server for pipewire:
|
|
# * pipewire-media-session (a minimal example)
|
|
# * wireplumber
|
|
# Wireplumber is being developed actively,
|
|
# upstream of pipewire is depreceating pipewire-media-session.
|
|
Requires: pipewire-session-manager
|
|
Suggests: wireplumber
|
|
Recommends: %{name}-utils = %{EVRD}
|
|
Recommends: %{name}-alsa = %{EVRD}
|
|
Recommends: %{name}-jack = %{EVRD}
|
|
Recommends: %{name}-gstreamer = %{EVRD}
|
|
Recommends: %{name}-pulseaudio = %{EVRD}
|
|
#Requires(post): (/usr/bin/systemd-sysusers or /bin/systemd-sysusers)
|
|
|
|
%description
|
|
PipeWire is a multimedia server for Linux and other Unix like operating
|
|
systems.
|
|
|
|
%files -f pipewire.lang
|
|
%doc COPYING LICENSE
|
|
%doc README.md
|
|
%dir %{_datadir}/%{name}
|
|
%{_datadir}/%{name}/*.conf
|
|
%{_bindir}/%{name}*
|
|
%{_bindir}/pw-cli
|
|
%{_mandir}/man1/%{name}.1*
|
|
%{_mandir}/man5/%{name}.conf.5*
|
|
%{_mandir}/man5/%{name}-client.conf.5*
|
|
%{_mandir}/man5/%{name}-filter-chain.conf.5*
|
|
%{_mandir}/man5/%{name}-jack.conf.5*
|
|
%{_mandir}/man7/%{name}-devices.7*
|
|
%{_sysusersdir}/%{name}.conf
|
|
%{_userunitdir}/%{name}.socket
|
|
%{_userunitdir}/%{name}.service
|
|
%{_userunitdir}/filter-chain.service
|
|
%dir %{_datadir}/alsa-card-profile
|
|
%dir %{_datadir}/alsa-card-profile/mixer
|
|
%dir %{_datadir}/alsa-card-profile/mixer/paths
|
|
%dir %{_datadir}/alsa-card-profile/mixer/profile-sets
|
|
%{_datadir}/alsa-card-profile/mixer/paths/*
|
|
%{_datadir}/alsa-card-profile/mixer/profile-sets/*
|
|
%{_udevrulesdir}/90-%{name}-alsa.rules
|
|
%dir %{_libdir}/%{name}-%{api}
|
|
%{_libdir}/%{name}-%{api}/lib%{name}-*.so
|
|
%dir %{_libdir}/%{name}-%{api}/v4l2
|
|
%{_libdir}/%{name}-%{api}/v4l2/libpw-v4l2.so
|
|
%{_libdir}/spa-%{spa_api}
|
|
%{_datadir}/pipewire/filter-chain
|
|
%{_datadir}/pipewire/client-rt.conf.avail/20-upmix.conf
|
|
%{_datadir}/pipewire/client.conf.avail/20-upmix.conf
|
|
%{_datadir}/pipewire/pipewire-pulse.conf.avail/20-upmix.conf
|
|
%{_datadir}/pipewire/pipewire.conf.avail/10-rates.conf
|
|
%{_datadir}/pipewire/pipewire.conf.avail/20-upmix.conf
|
|
%{_datadir}/spa-0.2/bluez5/bluez-hardware.conf
|
|
%{_sysconfdir}/security/limits.d/25-pw-rlimits.conf
|
|
|
|
%post
|
|
%sysusers_create %{name}.conf
|
|
%systemd_user_post %{name}.service
|
|
%systemd_user_post %{name}.socket
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package -n %{libname}
|
|
Summary: Libraries for PipeWire clients
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libname}
|
|
This package contains the runtime libraries for any application that wishes
|
|
to interface with a PipeWire media server.
|
|
|
|
%files -n %{libname}
|
|
%doc COPYING LICENSE
|
|
%doc README.md
|
|
%{_libdir}/lib%{name}-%{api}.so.%{major}*
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package -n %{devname}
|
|
Summary: Headers and libraries for PipeWire client development
|
|
Group: Development/C++
|
|
Requires: %{libname} = %{EVRD}
|
|
Requires: %{name}-alsa = %{EVRD}
|
|
Requires: %{name}-jack = %{EVRD}
|
|
Provides: %{name}-devel = %{EVRD}
|
|
|
|
%description -n %{devname}
|
|
Headers and libraries for developing applications that can communicate with
|
|
a PipeWire media server.
|
|
|
|
%files -n %{devname}
|
|
%doc COPYING LICENSE
|
|
%doc README.md
|
|
%{_includedir}/%{name}-%{api}
|
|
%{_includedir}/spa-%{spa_api}
|
|
%{_libdir}/lib%{name}-%{api}.so
|
|
%{_libdir}/pkgconfig/lib%{name}-%{api}.pc
|
|
%{_libdir}/pkgconfig/libspa-%{spa_api}.pc
|
|
%{_libdir}/%{name}-%{api}/jack/libjack*.so
|
|
%{_defaultdocdir}/%{name}/html
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package utils
|
|
Summary: PipeWire media server utilities
|
|
Group: Sound
|
|
Requires: %{name} = %{EVRD}
|
|
|
|
%description utils
|
|
This package contains command line utilities for the PipeWire media server.
|
|
|
|
%files utils
|
|
%doc COPYING LICENSE
|
|
%doc README.md
|
|
%{_bindir}/pw-cat
|
|
%{_bindir}/pw-config
|
|
%{_bindir}/pw-container
|
|
%{_bindir}/pw-dot
|
|
%{_bindir}/pw-dsdplay
|
|
%{_bindir}/pw-dump
|
|
%{_bindir}/pw-encplay
|
|
%{_bindir}/pw-link
|
|
%{_bindir}/pw-loopback
|
|
%{_bindir}/pw-metadata
|
|
%{_bindir}/pw-mididump
|
|
%{_bindir}/pw-midiplay
|
|
%{_bindir}/pw-midirecord
|
|
%{_bindir}/pw-mon
|
|
%{_bindir}/pw-play
|
|
%{_bindir}/pw-profiler
|
|
%{_bindir}/pw-record
|
|
%{_bindir}/pw-reserve
|
|
%{_bindir}/pw-top
|
|
%{_bindir}/pw-v4l2
|
|
%{_bindir}/spa-acp-tool
|
|
%{_bindir}/spa-inspect
|
|
%{_bindir}/spa-json-dump
|
|
%{_bindir}/spa-monitor
|
|
%{_bindir}/spa-resample
|
|
%{_mandir}/man1/pw-cat.1*
|
|
%{_mandir}/man1/pw-cli.1*
|
|
%{_mandir}/man1/pw-config.1*
|
|
%{_mandir}/man1/pw-container.1*
|
|
%{_mandir}/man1/pw-dot.1*
|
|
%{_mandir}/man1/pw-dump.1*
|
|
%{_mandir}/man1/pw-link.1*
|
|
%{_mandir}/man1/pw-loopback.1*
|
|
%{_mandir}/man1/pw-metadata.1*
|
|
%{_mandir}/man1/pw-mididump.1*
|
|
%{_mandir}/man1/pw-mon.1*
|
|
%{_mandir}/man1/pw-profiler.1*
|
|
%{_mandir}/man1/pw-reserve.1*
|
|
%{_mandir}/man1/pw-top.1*
|
|
%{_mandir}/man1/pw-v4l2.1*
|
|
%{_mandir}/man1/spa-acp-tool.1*
|
|
%{_mandir}/man1/spa-inspect.1*
|
|
%{_mandir}/man1/spa-json-dump.1*
|
|
%{_mandir}/man1/spa-monitor.1*
|
|
%{_mandir}/man1/spa-resample.1*
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package jack
|
|
Summary: PipeWire JACK implementation
|
|
Group: System/Libraries
|
|
Requires: %{name} = %{EVRD}
|
|
# XXX cycled deps...
|
|
Requires: %{libjack}%{_isa} = %{EVRD}
|
|
Requires: %{libjacknet}%{_isa} = %{EVRD}
|
|
Requires: %{libjackserver}%{_isa} = %{EVRD}
|
|
Provides: jack = %{fake_version}
|
|
Provides: jack%{_isa} = %{fake_version}
|
|
# jackit is a provide of jack
|
|
Provides: jackit = %{fake_version}
|
|
Provides: jackit%{_isa} = %{fake_version}
|
|
|
|
%description jack
|
|
This package provides a JACK implementation based on PipeWire.
|
|
|
|
%files jack
|
|
%doc COPYING LICENSE
|
|
%doc README.md
|
|
%{_bindir}/pw-jack
|
|
%{_mandir}/man1/pw-jack.1*
|
|
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/pipewire-jack-%{_arch}.conf
|
|
%{_datadir}/pipewire/jack.conf
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package -n %{libjack}
|
|
Summary: PipeWire Jack implementation
|
|
Group: System/Libraries
|
|
Requires: %{name}-jack%{_isa} = %{EVRD}
|
|
# prefer it over native Jack library if pipewire is installed
|
|
Enhances: pipewire
|
|
|
|
%description -n %{libjack}
|
|
libjack.so.0 from PipeWire, ABI-compatible with libjack.so.0 from Jack
|
|
|
|
%files -n %{libjack}
|
|
%doc COPYING LICENSE
|
|
%doc README.md
|
|
%{_libdir}/pipewire-%{api}/jack/libjack.so.0*
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package -n %{libjacknet}
|
|
Summary: PipeWire Jack implementation
|
|
Group: System/Libraries
|
|
Requires: %{name}-jack%{_isa} = %{EVRD}
|
|
# prefer it over native Jack library if pipewire is installed
|
|
Enhances: pipewire
|
|
|
|
%description -n %{libjacknet}
|
|
libjacknet.so.0 from PipeWire, ABI-compatible with libjacknet.so.0 from Jack
|
|
|
|
%files -n %{libjacknet}
|
|
%doc COPYING LICENSE
|
|
%doc README.md
|
|
%{_libdir}/pipewire-%{api}/jack/libjacknet.so.0*
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package -n %{libjackserver}
|
|
Summary: PipeWire Jack implementation
|
|
Group: System/Libraries
|
|
Requires: %{name}-jack%{_isa} = %{EVRD}
|
|
# prefer it over native Jack library if pipewire is installed
|
|
Enhances: pipewire
|
|
|
|
%description -n %{libjackserver}
|
|
libjackserver.so.0 from PipeWire, ABI-compatible with libjackserver.so.0 from Jack
|
|
|
|
%files -n %{libjackserver}
|
|
%doc COPYING LICENSE
|
|
%doc README.md
|
|
%{_libdir}/pipewire-%{api}/jack/libjackserver.so.0*
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package pulseaudio
|
|
Summary: PipeWire PulseAudio implementation
|
|
Group: System/Libraries
|
|
Requires: %{name} = %{EVRD}
|
|
# compat with Fedora
|
|
Provides: %{name}-pulse = %{EVRD}
|
|
Provides: %{name}-pulse%{_isa} = %{EVRD}
|
|
Provides: pulseaudio = %{fake_version}
|
|
Provides: pulseaudio%{_isa} = %{fake_version}
|
|
|
|
# Files in %%_userunitdir were moved to here,
|
|
# make upgrades smooth
|
|
#OrderWithRequires(pre): %{name} >= 0.3.23-2.gitcc1275.2
|
|
|
|
%description pulseaudio
|
|
This package provides a PulseAudio implementation based on PipeWire.
|
|
Native PulseAudio libraries (libpulse.so.0 etc.) from PulseAudio
|
|
communicate with a replacement of PulseAudio daemon from this package.
|
|
|
|
%files pulseaudio
|
|
%doc COPYING LICENSE
|
|
%doc README.md
|
|
# pipewire-pulse imitates real pulseaudio, libpulse.so.0 from pulseaudio
|
|
# is used by applications to work with this fake PulseAudio server
|
|
%{_bindir}/pipewire-pulse
|
|
%{_userunitdir}/%{name}-pulse.service
|
|
%{_userunitdir}/%{name}-pulse.socket
|
|
%{_datadir}/pipewire/pipewire-pulse.conf
|
|
%{_mandir}/man1/pipewire-pulse.1*
|
|
%{_mandir}/man5/pipewire-pulse.conf.5*
|
|
%{_mandir}/man7/libpipewire-module-*
|
|
%{_mandir}/man7/libpipewire-modules.7.*
|
|
%{_mandir}/man7/pipewire-pulse-module-*
|
|
%{_mandir}/man7/pipewire-pulse-modules.7*
|
|
|
|
%post pulseaudio
|
|
%systemd_user_post pipewire-pulse.service
|
|
%systemd_user_post pipewire-pulse.socket
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package alsa
|
|
Summary: PipeWire media server ALSA support
|
|
Group: Sound
|
|
Requires: %{name} = %{EVRD}
|
|
|
|
%description alsa
|
|
This package contains an ALSA plugin for the PipeWire media server.
|
|
|
|
%files alsa
|
|
%doc COPYING LICENSE
|
|
%doc README.md
|
|
%config(noreplace) %{_sysconfdir}/alsa/conf.d/50-%{name}.conf
|
|
%config(noreplace) %{_sysconfdir}/alsa/conf.d/99-%{name}-default.conf
|
|
%{_datadir}/alsa/alsa.conf.d/50-%{name}.conf
|
|
%{_datadir}/alsa/alsa.conf.d/99-%{name}-default.conf
|
|
%{_libdir}/alsa-lib/libasound_module_ctl_%{name}.so
|
|
%{_libdir}/alsa-lib/libasound_module_pcm_%{name}.so
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package gstreamer
|
|
Summary: GStreamer elements for PipeWire
|
|
Group: Sound
|
|
Requires: %{name} = %{EVRD}
|
|
|
|
%description gstreamer
|
|
This package contains GStreamer elements to interface with a
|
|
PipeWire media server.
|
|
|
|
%files gstreamer
|
|
%doc COPYING LICENSE
|
|
%doc README.md
|
|
%{_libdir}/gstreamer-1.0/libgstpipewire.so
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
/usr/libexec/python3.8 -m venv .
|
|
. bin/activate
|
|
|
|
%meson \
|
|
-Dsession-managers="[]" \
|
|
-Dudevrulesdir=%{_udevrulesdir} \
|
|
-Ddbus="enabled" \
|
|
-Dudev="enabled" \
|
|
-Dpipewire-v4l2="enabled" \
|
|
-Dbluez5="enabled" \
|
|
-Dffmpeg="enabled" \
|
|
%ifnarch %{e2k}
|
|
-Dlibcamera="enabled" \
|
|
%endif
|
|
-Dsdl2="disabled" \
|
|
-Dvolume="disabled" \
|
|
-Davb="enabled" \
|
|
-Dreadline="enabled" \
|
|
-Ddocs="enabled" \
|
|
-Dman="enabled" \
|
|
-Dgstreamer="enabled" \
|
|
-Dgstreamer-device-provider="disabled" \
|
|
-Daudiotestsrc="disabled" \
|
|
-Dbluez5-codec-lc3="enabled" \
|
|
-Dbluez5-codec-lc3plus="disabled" \
|
|
-Dsystemd="enabled" \
|
|
-Dvulkan="enabled" \
|
|
-Davahi="enabled" \
|
|
-Dpw-cat-ffmpeg="enabled" \
|
|
-Dpw-cat="enabled" \
|
|
-Dv4l2="enabled" \
|
|
-Dsndfile="enabled" \
|
|
-Dlibmysofa="enabled" \
|
|
-Dlv2="enabled" \
|
|
-Dflatpak="enabled" \
|
|
-Dlibffado="enabled" \
|
|
-Dopus="enabled" \
|
|
%ifnarch %{e2k} riscv64
|
|
-Droc="enabled" \
|
|
%endif
|
|
-Dlibusb="enabled"
|
|
%meson_build
|
|
|
|
%install
|
|
/usr/libexec/python3.8
|
|
. bin/activate
|
|
|
|
%meson_install
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alsa/conf.d/
|
|
cp %{buildroot}%{_datadir}/alsa/alsa.conf.d/50-%{name}.conf %{buildroot}%{_sysconfdir}/alsa/conf.d/50-%{name}.conf
|
|
cp %{buildroot}%{_datadir}/alsa/alsa.conf.d/99-%{name}-default.conf %{buildroot}%{_sysconfdir}/alsa/conf.d/99-%{name}-default.conf
|
|
|
|
#install sysuser config
|
|
install -d %{buildroot}%{_sysusersdir}/
|
|
install -m0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf
|
|
|
|
# Load PipeWire's ABI compatible libraries instead of native ones
|
|
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
|
|
echo "%{_libdir}/pipewire-%{api}/jack" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/pipewire-jack-%{_arch}.conf
|
|
|
|
%find_lang pipewire
|