Blame SPECS/pipewire.spec

7ee49a
%global apiversion   0.3
7ee49a
%global spaversion   0.2
999952
999952
#global snap       20141103
999952
#global gitrel     327
999952
#global gitcommit  aec811798cd883a454b9b5cd82c77831906bbd2d
999952
#global shortcommit %(c=%{gitcommit}; echo ${c:0:5})
999952
999952
# https://bugzilla.redhat.com/983606
999952
%global _hardened_build 1
999952
999952
# where/how to apply multilib hacks
999952
%global multilib_archs x86_64 %{ix86} ppc64 ppc s390x s390 sparc64 sparcv9 ppc64le
999952
7ee49a
%global enable_alsa 1
7ee49a
7ee49a
%if 0%{?fedora}
7ee49a
%global enable_jack 1
7ee49a
%global enable_pulse 1
7ee49a
%global enable_vulkan 1
7ee49a
%endif
7ee49a
7ee49a
# libpulse and libjack subpackages shouldn't have library provides
7ee49a
# as the files they ship are not in the linker path. We also have
7ee49a
# to exclude requires or else the subpackages wind up requiring the
7ee49a
# libs they're no longer providing
7ee49a
# FIXME: the jack-audio-connection-kit and pulseaudio subpackages
7ee49a
# should get the auto-generated Provides: instead, but they do not,
7ee49a
# either with or without the lines below, not sure how to fix that
7ee49a
%global __provides_exclude_from ^%{_libdir}/pipewire-%{apiversion}/.*$
7ee49a
%global __requires_exclude_from ^%{_libdir}/pipewire-%{apiversion}/.*$
7ee49a
999952
Name:           pipewire
999952
Summary:        Media Sharing Server
7ee49a
Version:        0.3.6
999952
Release:        1%{?snap:.%{snap}git%{shortcommit}}%{?dist}
7ee49a
License:        MIT
999952
URL:            https://pipewire.org/
999952
%if 0%{?gitrel}
999952
# git clone git://anongit.freedesktop.org/gstreamer/pipewire
999952
# cd pipewire; git reset --hard %{gitcommit}; ./autogen.sh; make; make distcheck
999952
Source0:        pipewire-%{version}-%{gitrel}-g%{shortcommit}.tar.gz
999952
%else
7ee49a
Source0:	https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/%{version}/pipewire-%{version}.tar.gz
999952
%endif
999952
999952
## upstream patches
999952
999952
## upstreamable patches
999952
7ee49a
## fedora patches
7ee49a
Patch0:		0001-conf-disable-bluez5.patch
7ee49a
7ee49a
BuildRequires:  meson >= 0.49.0
999952
BuildRequires:  gcc
999952
BuildRequires:  pkgconfig
999952
BuildRequires:  pkgconfig(libudev)
999952
BuildRequires:  pkgconfig(dbus-1)
999952
BuildRequires:  pkgconfig(glib-2.0) >= 2.32
999952
BuildRequires:  pkgconfig(gio-unix-2.0) >= 2.32
999952
BuildRequires:  pkgconfig(gstreamer-1.0) >= 1.10.0
999952
BuildRequires:  pkgconfig(gstreamer-base-1.0) >= 1.10.0
999952
BuildRequires:  pkgconfig(gstreamer-plugins-base-1.0) >= 1.10.0
999952
BuildRequires:  pkgconfig(gstreamer-net-1.0) >= 1.10.0
999952
BuildRequires:  pkgconfig(gstreamer-allocators-1.0) >= 1.10.0
7ee49a
%if 0%{?enable_vulkan}
7ee49a
BuildRequires:  pkgconfig(vulkan)
7ee49a
%endif
7ee49a
BuildRequires:  pkgconfig(bluez)
999952
BuildRequires:  systemd-devel >= 184
999952
BuildRequires:  alsa-lib-devel
999952
BuildRequires:  libv4l-devel
999952
BuildRequires:  doxygen
999952
BuildRequires:  xmltoman
999952
BuildRequires:  graphviz
999952
BuildRequires:  sbc-devel
7ee49a
BuildRequires:  libsndfile-devel
999952
999952
Requires(pre):  shadow-utils
999952
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
999952
Requires:       systemd >= 184
999952
Requires:       rtkit
999952
999952
# https://bugzilla.redhat.com/983606
999952
%global _hardened_build 1
999952
999952
## enable systemd activation
999952
%global systemd 1
999952
999952
%description
999952
PipeWire is a multimedia server for Linux and other Unix like operating
999952
systems.
999952
999952
%package libs
999952
Summary:        Libraries for PipeWire clients
7ee49a
License:        MIT
76997a
Recommends:     %{name}%{?_isa} = %{version}-%{release}
999952
999952
%description libs
999952
This package contains the runtime libraries for any application that wishes
999952
to interface with a PipeWire media server.
999952
7ee49a
%package gstreamer
7ee49a
Summary:        GStreamer elements for PipeWire
7ee49a
License:        MIT
7ee49a
Recommends:     %{name}%{?_isa} = %{version}-%{release}
7ee49a
7ee49a
%description gstreamer
7ee49a
This package contains GStreamer elements to interface with a
7ee49a
PipeWire media server.
7ee49a
999952
%package devel
999952
Summary:        Headers and libraries for PipeWire client development
7ee49a
License:        MIT
999952
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
999952
%description devel
999952
Headers and libraries for developing applications that can communicate with
999952
a PipeWire media server.
999952
999952
%package doc
999952
Summary:        PipeWire media server documentation
7ee49a
License:        MIT
999952
999952
%description doc
999952
This package contains documentation for the PipeWire media server.
999952
999952
%package utils
999952
Summary:        PipeWire media server utilities
7ee49a
License:        MIT
999952
Requires:       %{name}%{?_isa} = %{version}-%{release}
999952
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
999952
999952
%description utils
999952
This package contains command line utilities for the PipeWire media server.
999952
7ee49a
%if 0%{?enable_alsa}
7ee49a
%package alsa
7ee49a
Summary:        PipeWire media server ALSA support
7ee49a
License:        MIT
7ee49a
Recommends:     %{name}%{?_isa} = %{version}-%{release}
7ee49a
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
7ee49a
7ee49a
%description alsa
7ee49a
This package contains an ALSA plugin for the PipeWire media server.
7ee49a
%endif
7ee49a
7ee49a
%if 0%{?enable_jack}
7ee49a
%package libjack
7ee49a
Summary:        PipeWire libjack library
7ee49a
License:        MIT
7ee49a
Recommends:     %{name}%{?_isa} = %{version}-%{release}
7ee49a
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
7ee49a
BuildRequires:  jack-audio-connection-kit-devel >= 1.9.10
7ee49a
# Renamed in F32
7ee49a
Obsoletes:      pipewire-jack < 0.2.96-2
7ee49a
7ee49a
%description libjack
7ee49a
This package contains a PipeWire replacement for JACK audio connection kit
7ee49a
"libjack" library.
7ee49a
7ee49a
%package jack-audio-connection-kit
7ee49a
Summary:        PipeWire JACK implementation
7ee49a
License:        MIT
7ee49a
Recommends:     %{name}%{?_isa} = %{version}-%{release}
7ee49a
Requires:       %{name}-libjack%{?_isa} = %{version}-%{release}
7ee49a
BuildRequires:  jack-audio-connection-kit-devel >= 1.9.10
7ee49a
Conflicts:      jack-audio-connection-kit
7ee49a
Conflicts:      jack-audio-connection-kit-dbus
7ee49a
Provides:       jack-audio-connection-kit
7ee49a
7ee49a
%description jack-audio-connection-kit
7ee49a
This package provides a JACK implementation based on PipeWire
7ee49a
7ee49a
%package plugin-jack
7ee49a
Summary:        PipeWire media server JACK support
7ee49a
License:        MIT
7ee49a
BuildRequires:  jack-audio-connection-kit-devel
7ee49a
Recommends:     %{name}%{?_isa} = %{version}-%{release}
7ee49a
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
7ee49a
Requires:       jack-audio-connection-kit
7ee49a
7ee49a
%description plugin-jack
7ee49a
This package contains the PipeWire spa plugin to connect to a JACK server.
7ee49a
%endif
7ee49a
7ee49a
%if 0%{?enable_pulse}
7ee49a
%package libpulse
7ee49a
Summary:        PipeWire libpulse library
7ee49a
License:        MIT
7ee49a
Recommends:     %{name}%{?_isa} = %{version}-%{release}
7ee49a
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
7ee49a
BuildRequires:  pulseaudio-libs-devel
7ee49a
# Renamed in F32
7ee49a
Obsoletes:      pipewire-pulseaudio < 0.2.96-2
7ee49a
7ee49a
%description libpulse
7ee49a
This package contains a PipeWire replacement for PulseAudio "libpulse" library.
7ee49a
7ee49a
%package pulseaudio
7ee49a
Summary:        PipeWire PulseAudio implementation
7ee49a
License:        MIT
7ee49a
Recommends:     %{name}%{?_isa} = %{version}-%{release}
7ee49a
Requires:       %{name}-libpulse%{?_isa} = %{version}-%{release}
7ee49a
BuildRequires:  pulseaudio-libs-devel
7ee49a
Conflicts:      pulseaudio-libs
7ee49a
Conflicts:      pulseaudio-libs-glib2
7ee49a
Provides:       pulseaudio-libs
7ee49a
Provides:       pulseaudio-libs-glib2
7ee49a
7ee49a
%description pulseaudio
7ee49a
This package provides a PulseAudio implementation based on PipeWire
7ee49a
%endif
7ee49a
999952
%prep
999952
%setup -q -T -b0 -n %{name}-%{version}%{?gitrel:-%{gitrel}-g%{shortcommit}}
999952
7ee49a
%patch0 -p1 -b .0000
7ee49a
999952
%build
7ee49a
%meson \
7ee49a
    -D docs=true -D man=true -D gstreamer=true -D systemd=true 		\
7ee49a
    %{!?enable_jack:-D jack=false -D pipewire-jack=false} 		\
7ee49a
    %{!?enable_pulse:-D pipewire-pulseaudio=false}			\
7ee49a
    %{!?enable_alsa:-D pipewire-alsa=false}				\
7ee49a
    %{!?enable_vulkan:-D vulkan=false}
999952
999952
%install
999952
%meson_install
999952
999952
mkdir %{buildroot}%{_userunitdir}/sockets.target.wants
999952
ln -s ../pipewire.socket %{buildroot}%{_userunitdir}/sockets.target.wants/pipewire.socket
999952
7ee49a
%if 0%{?enable_jack}
7ee49a
ln -s pipewire-%{apiversion}/jack/libjack.so.0 %{buildroot}%{_libdir}/libjack.so.0.1.0
7ee49a
ln -s libjack.so.0.1.0 %{buildroot}%{_libdir}/libjack.so.0
7ee49a
ln -s pipewire-%{apiversion}/jack/libjackserver.so.0 %{buildroot}%{_libdir}/libjackserver.so.0.1.0
7ee49a
ln -s libjackserver.so.0.1.0 %{buildroot}%{_libdir}/libjackserver.so.0
7ee49a
ln -s pipewire-%{apiversion}/jack/libjacknet.so.0 %{buildroot}%{_libdir}/libjacknet.so.0.1.0
7ee49a
ln -s libjacknet.so.0.1.0 %{buildroot}%{_libdir}/libjacknet.so.0
7ee49a
%endif
7ee49a
7ee49a
%if 0%{?enable_pulse}
7ee49a
ln -s pipewire-%{apiversion}/pulse/libpulse.so.0 %{buildroot}%{_libdir}/libpulse.so.0
7ee49a
ln -s pipewire-%{apiversion}/pulse/libpulse-simple.so.0 %{buildroot}%{_libdir}/libpulse-simple.so.0
7ee49a
ln -s pipewire-%{apiversion}/pulse/libpulse-mainloop-glib.so.0 %{buildroot}%{_libdir}/libpulse-mainloop-glib.so.0
7ee49a
%endif
7ee49a
7ee49a
%if 0%{?enable_alsa}
7ee49a
mkdir -p %{buildroot}%{_sysconfdir}/alsa/conf.d/
7ee49a
cp %{buildroot}%{_datadir}/alsa/alsa.conf.d/50-pipewire.conf \
7ee49a
        %{buildroot}%{_sysconfdir}/alsa/conf.d/50-pipewire.conf
7ee49a
cp %{buildroot}%{_datadir}/alsa/alsa.conf.d/99-pipewire-default.conf \
7ee49a
        %{buildroot}%{_sysconfdir}/alsa/conf.d/99-pipewire-default.conf
7ee49a
%endif
7ee49a
999952
%check
7ee49a
%ifarch s390x
7ee49a
# FIXME: s390x FAIL: pw-test-stream, pw-test-endpoint
7ee49a
%global tests_nonfatal 1
7ee49a
%endif
7ee49a
%meson_test || TESTS_ERROR=$?
7ee49a
if [ "${TESTS_ERROR}" != "" ]; then
7ee49a
echo "test failed"
7ee49a
%{!?tests_nonfatal:exit $TESTS_ERROR}
7ee49a
fi
999952
999952
%pre
999952
getent group pipewire >/dev/null || groupadd -r pipewire
999952
getent passwd pipewire >/dev/null || \
999952
    useradd -r -g pipewire -d %{_localstatedir}/run/pipewire -s /sbin/nologin -c "PipeWire System Daemon" pipewire
999952
exit 0
999952
76997a
%ldconfig_scriptlets libs
999952
999952
%files
7ee49a
%license LICENSE COPYING
7ee49a
%doc README.md
999952
%if 0%{?systemd}
999952
%{_userunitdir}/pipewire.*
999952
%{_userunitdir}/sockets.target.wants/pipewire.socket
999952
%endif
999952
%{_bindir}/pipewire
7ee49a
%{_bindir}/pipewire-media-session
999952
%{_mandir}/man1/pipewire.1*
76997a
%dir %{_sysconfdir}/pipewire/
7ee49a
%config(noreplace) %{_sysconfdir}/pipewire/pipewire.conf
76997a
%{_mandir}/man5/pipewire.conf.5*
999952
999952
%files libs
7ee49a
%license LICENSE COPYING
7ee49a
%doc README.md
76997a
%{_libdir}/libpipewire-%{apiversion}.so.*
7ee49a
%{_libdir}/pipewire-%{apiversion}/libpipewire-*.so
7ee49a
%dir %{_libdir}/spa-%{spaversion}
7ee49a
%{_libdir}/spa-%{spaversion}/alsa/
7ee49a
%{_libdir}/spa-%{spaversion}/audioconvert/
7ee49a
%{_libdir}/spa-%{spaversion}/audiomixer/
7ee49a
%{_libdir}/spa-%{spaversion}/bluez5/
7ee49a
%{_libdir}/spa-%{spaversion}/control/
7ee49a
%{_libdir}/spa-%{spaversion}/support/
7ee49a
%{_libdir}/spa-%{spaversion}/v4l2/
7ee49a
%{_libdir}/spa-%{spaversion}/videoconvert/
7ee49a
%if 0%{?enable_vulkan}
7ee49a
%{_libdir}/spa-%{spaversion}/vulkan/
7ee49a
%endif
7ee49a
7ee49a
%files gstreamer
7ee49a
%{_libdir}/gstreamer-1.0/libgstpipewire.*
999952
999952
%files devel
999952
%{_libdir}/libpipewire-%{apiversion}.so
7ee49a
%{_includedir}/pipewire-%{apiversion}/
7ee49a
%{_includedir}/spa-%{spaversion}/
999952
%{_libdir}/pkgconfig/libpipewire-%{apiversion}.pc
999952
%{_libdir}/pkgconfig/libspa-%{spaversion}.pc
999952
999952
%files doc
999952
%{_datadir}/doc/pipewire/html
999952
999952
%files utils
7ee49a
%{_bindir}/pw-mon
7ee49a
%{_bindir}/pw-metadata
7ee49a
%{_bindir}/pw-mididump
7ee49a
%{_bindir}/pw-midiplay
7ee49a
%{_bindir}/pw-midirecord
7ee49a
%{_bindir}/pw-cli
7ee49a
%{_bindir}/pw-dot
7ee49a
%{_bindir}/pw-cat
7ee49a
%{_bindir}/pw-play
7ee49a
%{_bindir}/pw-profiler
7ee49a
%{_bindir}/pw-record
7ee49a
%{_mandir}/man1/pw-mon.1*
7ee49a
%{_mandir}/man1/pw-cli.1*
7ee49a
%{_mandir}/man1/pw-cat.1*
7ee49a
%{_mandir}/man1/pw-dot.1*
7ee49a
%{_mandir}/man1/pw-metadata.1*
7ee49a
%{_mandir}/man1/pw-mididump.1*
7ee49a
%{_mandir}/man1/pw-profiler.1*
7ee49a
999952
%{_bindir}/spa-monitor
999952
%{_bindir}/spa-inspect
999952
7ee49a
%if 0%{?enable_alsa}
7ee49a
%files alsa
7ee49a
%{_libdir}/alsa-lib/libasound_module_pcm_pipewire.so
7ee49a
%{_datadir}/alsa/alsa.conf.d/50-pipewire.conf
7ee49a
%{_datadir}/alsa/alsa.conf.d/99-pipewire-default.conf
7ee49a
%config(noreplace) %{_sysconfdir}/alsa/conf.d/50-pipewire.conf
7ee49a
%config(noreplace) %{_sysconfdir}/alsa/conf.d/99-pipewire-default.conf
7ee49a
%endif
7ee49a
7ee49a
%if 0%{?enable_jack}
7ee49a
%files libjack
7ee49a
%{_libdir}/pipewire-%{apiversion}/jack/libjack.so*
7ee49a
%{_libdir}/pipewire-%{apiversion}/jack/libjacknet.so*
7ee49a
%{_libdir}/pipewire-%{apiversion}/jack/libjackserver.so*
7ee49a
%{_bindir}/pw-jack
7ee49a
%{_mandir}/man1/pw-jack.1*
7ee49a
7ee49a
%files jack-audio-connection-kit
7ee49a
%{_libdir}/libjack.so.*
7ee49a
%{_libdir}/libjackserver.so.*
7ee49a
%{_libdir}/libjacknet.so.*
7ee49a
7ee49a
%files plugin-jack
7ee49a
%{_libdir}/spa-%{spaversion}/jack/
7ee49a
%endif
7ee49a
7ee49a
%if 0%{?enable_pulse}
7ee49a
%files libpulse
7ee49a
%{_libdir}/pipewire-%{apiversion}/pulse/libpulse.so*
7ee49a
%{_libdir}/pipewire-%{apiversion}/pulse/libpulse-simple.so*
7ee49a
%{_libdir}/pipewire-%{apiversion}/pulse/libpulse-mainloop-glib.so*
7ee49a
%{_bindir}/pw-pulse
7ee49a
%{_mandir}/man1/pw-pulse.1*
7ee49a
7ee49a
%files pulseaudio
7ee49a
%{_libdir}/libpulse.so.0
7ee49a
%{_libdir}/libpulse-simple.so.0
7ee49a
%{_libdir}/libpulse-mainloop-glib.so.0
7ee49a
%endif
76997a
999952
%changelog
7ee49a
* Tue Jun 23 2020 Wim Taymans <wtaymans@redhat.com> - 0.3.6-1
7ee49a
- Update to 0.3.6
7ee49a
- Resolves: rhbz#1832347
7ee49a
7ee49a
* Mon Jun 15 2020 Wim Taymans <wtaymans@redhat.com> - 0.3.5-3
7ee49a
- Rebuild
7ee49a
- Resolves: rhbz#1832347
7ee49a
7ee49a
* Tue May 19 2020 Wim Taymans <wtaymans@redhat.com> - 0.3.5-2
7ee49a
- Disable vulkan
7ee49a
- Resolves: rhbz#1832347
7ee49a
7ee49a
* Tue May 19 2020 Wim Taymans <wtaymans@redhat.com> - 0.3.5-1
7ee49a
- Update to 0.3.5
7ee49a
- Disable pulse and jack
7ee49a
- Add patch to work with meson 0.49
7ee49a
- Add patch to fix neon compilation
7ee49a
- Resolves: rhbz#1832347
7ee49a
76997a
* Fri Oct 18 2019 David King <dking@redhat.com> - 0.2.7-1
76997a
- Rebase to 0.2.7 (#1748331)
76997a
999952
* Fri Jan 11 2019 Wim Taymans <wtaymans@redhat.com> - 0.2.5-1
999952
- Update to 0.2.5
999952
- Revert patch that requires too new meson
999952
- Add patch to avoid invalid conversion error with C++ compilers
999952
- Resolves: #1664569
999952
999952
* Fri Nov 30 2018 Wim Taymans <wtaymans@redhat.com> - 0.2.4-1
999952
- Update to 0.2.4
999952
- Add defines for cursor and bitmap metadata
999952
- Revert patch that requires too new meson
999952
- Resolves: #1655028
999952
999952
* Thu Oct 18 2018 Wim Taymans <wtaymans@redhat.com> - 0.2.3-2
999952
- Add systemd socket activation
999952
- Resolves: #1639871
999952
999952
* Fri Oct 12 2018 Wim Taymans <wtaymans@redhat.com> - 0.2.3-1
999952
- Update to 0.2.3
999952
- Resolves: #1638046
999952
999952
* Wed Aug 01 2018 Wim Taymans <wtaymans@redhat.com> - 0.2.2-1
999952
- Update to 0.2.2
999952
999952
* Tue Feb 27 2018 Wim Taymans <wtaymans@redhat.com> - 0.1.9-1
999952
- Update to 0.1.9
999952
999952
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.8-3
999952
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
999952
999952
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.1.8-2
999952
- Switch to %%ldconfig_scriptlets
999952
999952
* Tue Jan 23 2018 Wim Taymans <wtaymans@redhat.com> - 0.1.8-1
999952
- Update to 0.1.8
999952
999952
* Fri Nov 24 2017 Wim Taymans <wtaymans@redhat.com> - 0.1.7-1
999952
- Update to 0.1.7
999952
- Add to build when memfd_create is already defined
999952
999952
* Fri Nov 03 2017 Wim Taymans <wtaymans@redhat.com> - 0.1.6-1
999952
- Update to 0.1.6
999952
999952
* Tue Sep 19 2017 Wim Taymans <wtaymans@redhat.com> - 0.1.5-2
999952
- Add patch to avoid segfault when probing
999952
999952
* Tue Sep 19 2017 Wim Taymans <wtaymans@redhat.com> - 0.1.5-1
999952
- Update to 0.1.5
999952
999952
* Thu Sep 14 2017 Kalev Lember <klember@redhat.com> - 0.1.4-3
999952
- Rebuilt for GNOME 3.26.0 megaupdate
999952
999952
* Fri Sep 08 2017 Wim Taymans <wtaymans@redhat.com> - 0.1.4-2
999952
- Install SPA hooks
999952
999952
* Wed Aug 23 2017 Wim Taymans <wtaymans@redhat.com> - 0.1.4-1
999952
- Update to 0.1.4
999952
999952
* Wed Aug 09 2017 Wim Taymans <wtaymans@redhat.com> - 0.1.3-1
999952
- Update to 0.1.3
999952
999952
* Tue Jul 04 2017 Wim Taymans <wtaymans@redhat.com> - 0.1.2-1
999952
- Update to 0.1.2
999952
- Added more build requirements
999952
- Make separate doc package
999952
999952
* Mon Jun 26 2017 Wim Taymans <wtaymans@redhat.com> - 0.1.1-1
999952
- Update to 0.1.1
999952
- Add dbus-1 to BuildRequires
999952
- change libs-devel to -devel
999952
999952
* Wed Sep 9 2015 Wim Taymans <wtaymans@redhat.com> - 0.1.0-2
999952
- Fix BuildRequires to use pkgconfig, add all dependencies found in configure.ac
999952
- Add user and groups  if needed
999952
- Add license to %%licence
999952
999952
* Tue Sep 1 2015 Wim Taymans <wtaymans@redhat.com> - 0.1.0-1
999952
- First version