diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ccae7c5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/0.2.5.tar.gz diff --git a/.pipewire.metadata b/.pipewire.metadata new file mode 100644 index 0000000..9b817f6 --- /dev/null +++ b/.pipewire.metadata @@ -0,0 +1 @@ +c8d918824f9b85318b1610a74480081a96c32392 SOURCES/0.2.5.tar.gz diff --git a/SOURCES/0001-Avoid-invalid-conversion-error-with-C-compilators.patch b/SOURCES/0001-Avoid-invalid-conversion-error-with-C-compilators.patch new file mode 100644 index 0000000..5435caf --- /dev/null +++ b/SOURCES/0001-Avoid-invalid-conversion-error-with-C-compilators.patch @@ -0,0 +1,25 @@ +From c26d938f18d4c92ec515e82037eda42b0e2999ef Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Wed, 2 Jan 2019 10:05:40 +0100 +Subject: [PATCH 1/2] Avoid invalid conversion error with C++ compilators + +--- + src/pipewire/utils.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/pipewire/utils.h b/src/pipewire/utils.h +index 2ce9fdde..7262ff42 100644 +--- a/src/pipewire/utils.h ++++ b/src/pipewire/utils.h +@@ -58,7 +58,7 @@ pw_spa_pod_copy(const struct spa_pod *pod) + return NULL; + + size = SPA_POD_SIZE(pod); +- if ((c = malloc(size)) == NULL) ++ if ((c = (struct spa_pod *) malloc(size)) == NULL) + return NULL; + + return (struct spa_pod *) memcpy(c, pod, size); +-- +2.19.2 + diff --git a/SOURCES/0002-Revert-meson-Use-feature-for-GStreamer-and-make-it-a.patch b/SOURCES/0002-Revert-meson-Use-feature-for-GStreamer-and-make-it-a.patch new file mode 100644 index 0000000..da36ae5 --- /dev/null +++ b/SOURCES/0002-Revert-meson-Use-feature-for-GStreamer-and-make-it-a.patch @@ -0,0 +1,110 @@ +From 5fb074785ec5ee8f7a9f162766dd4462ebf0a149 Mon Sep 17 00:00:00 2001 +From: Wim Taymans +Date: Fri, 30 Nov 2018 16:58:47 +0100 +Subject: [PATCH 2/2] Revert "meson: Use feature for GStreamer and make it + auto" + +This reverts commit 795b352cbaf68ce6f05ab9e9d46d4eff39ffee14. +--- + meson.build | 31 +++++++++++-------------------- + meson_options.txt | 4 ++-- + src/daemon/meson.build | 3 ++- + src/meson.build | 2 +- + 4 files changed, 16 insertions(+), 24 deletions(-) + +diff --git a/meson.build b/meson.build +index 3c3b6dfb..d54f0d42 100644 +--- a/meson.build ++++ b/meson.build +@@ -1,6 +1,6 @@ + project('pipewire', 'c', + version : '0.2.5', +- meson_version : '>= 0.47.0', ++ meson_version : '>= 0.45.0', + default_options : [ 'warning_level=1', + 'c_std=gnu99', + 'buildtype=debugoptimized' ]) +@@ -161,25 +161,16 @@ dl_lib = cc.find_library('dl', required : false) + pthread_lib = dependency('threads') + dbus_dep = dependency('dbus-1') + +-if not get_option('gstreamer').disabled() +- build_gst = true +- glib_dep = [dependency('glib-2.0', version : '>=2.32.0', required: get_option('gstreamer'))] +- gobject_dep = [dependency('gobject-2.0', required: get_option('gstreamer'))] +- gmodule_dep = [dependency('gmodule-2.0', required: get_option('gstreamer'))] +- gio_dep = [dependency('gio-2.0', required: get_option('gstreamer')), dependency('gio-unix-2.0', required: get_option('gstreamer'))] +- gst_dep = [dependency('gstreamer-1.0', required: get_option('gstreamer')), +- dependency('gstreamer-plugins-base-1.0', required: get_option('gstreamer')), +- dependency('gstreamer-video-1.0', required: get_option('gstreamer')), +- dependency('gstreamer-audio-1.0', required: get_option('gstreamer')), +- dependency('gstreamer-allocators-1.0', required: get_option('gstreamer')),] +- foreach dep: glib_dep + gobject_dep + gio_dep + gst_dep +- if build_gst and not dep.found() +- build_gst = false +- message('@0@ not found, disabling GStreamer'.format(dep)) +- endif +- endforeach +-else +- build_gst = false ++if get_option('gstreamer') ++ glib_dep = dependency('glib-2.0', version : '>=2.32.0') ++ gobject_dep = dependency('gobject-2.0') ++ gmodule_dep = dependency('gmodule-2.0') ++ gio_dep = [dependency('gio-2.0'), dependency('gio-unix-2.0')] ++ gst_dep = [dependency('gstreamer-1.0'), ++ dependency('gstreamer-plugins-base-1.0'), ++ dependency('gstreamer-video-1.0'), ++ dependency('gstreamer-audio-1.0'), ++ dependency('gstreamer-allocators-1.0'),] + endif + + subdir('spa') +diff --git a/meson_options.txt b/meson_options.txt +index 5ea74ff0..3d21b2b4 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -8,8 +8,8 @@ option('man', + value: false) + option('gstreamer', + description: 'Build GStreamer plugins', +- type: 'feature', +- value: 'auto') ++ type: 'boolean', ++ value: false) + option('systemd', + description: 'Enable systemd integration', + type: 'boolean', +diff --git a/src/daemon/meson.build b/src/daemon/meson.build +index f2a327fb..4a7d9536 100644 +--- a/src/daemon/meson.build ++++ b/src/daemon/meson.build +@@ -13,11 +13,12 @@ pipewire_c_args = [ + '-DG_LOG_DOMAIN=g_log_domain_pipewire', + ] + ++conf_config = configuration_data() + conf_install_dir = join_paths(get_option('sysconfdir'), 'pipewire') + + configure_file(input : 'pipewire.conf.in', + output : 'pipewire.conf', +- copy : true, ++ configuration : conf_config, + install_dir : conf_install_dir) + + +diff --git a/src/meson.build b/src/meson.build +index 723e2c69..0ad7778d 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -6,6 +6,6 @@ subdir('tools') + subdir('modules') + subdir('examples') + +-if build_gst ++if get_option('gstreamer') + subdir('gst') + endif +-- +2.19.2 + diff --git a/SPECS/pipewire.spec b/SPECS/pipewire.spec new file mode 100644 index 0000000..c80989a --- /dev/null +++ b/SPECS/pipewire.spec @@ -0,0 +1,247 @@ +%global apiversion 0.2 +%global spaversion 0.1 + +#global snap 20141103 +#global gitrel 327 +#global gitcommit aec811798cd883a454b9b5cd82c77831906bbd2d +#global shortcommit %(c=%{gitcommit}; echo ${c:0:5}) + +# https://bugzilla.redhat.com/983606 +%global _hardened_build 1 + +# where/how to apply multilib hacks +%global multilib_archs x86_64 %{ix86} ppc64 ppc s390x s390 sparc64 sparcv9 ppc64le + +Name: pipewire +Summary: Media Sharing Server +Version: 0.2.5 +Release: 1%{?snap:.%{snap}git%{shortcommit}}%{?dist} +License: LGPLv2+ +URL: https://pipewire.org/ +%if 0%{?gitrel} +# git clone git://anongit.freedesktop.org/gstreamer/pipewire +# cd pipewire; git reset --hard %{gitcommit}; ./autogen.sh; make; make distcheck +Source0: pipewire-%{version}-%{gitrel}-g%{shortcommit}.tar.gz +%else +Source0: https://github.com/PipeWire/pipewire/archive/%{version}.tar.gz +%endif + +## upstream patches +Patch0: 0001-Avoid-invalid-conversion-error-with-C-compilators.patch +Patch1: 0002-Revert-meson-Use-feature-for-GStreamer-and-make-it-a.patch + +## upstreamable patches + +BuildRequires: meson >= 0.35.0 +BuildRequires: gcc +BuildRequires: pkgconfig +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(glib-2.0) >= 2.32 +BuildRequires: pkgconfig(gio-unix-2.0) >= 2.32 +BuildRequires: pkgconfig(gstreamer-1.0) >= 1.10.0 +BuildRequires: pkgconfig(gstreamer-base-1.0) >= 1.10.0 +BuildRequires: pkgconfig(gstreamer-plugins-base-1.0) >= 1.10.0 +BuildRequires: pkgconfig(gstreamer-net-1.0) >= 1.10.0 +BuildRequires: pkgconfig(gstreamer-allocators-1.0) >= 1.10.0 +BuildRequires: systemd-devel >= 184 +BuildRequires: alsa-lib-devel +BuildRequires: libv4l-devel +BuildRequires: doxygen +BuildRequires: xmltoman +BuildRequires: graphviz +BuildRequires: sbc-devel + +Requires(pre): shadow-utils +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: systemd >= 184 +Requires: rtkit + +# https://bugzilla.redhat.com/983606 +%global _hardened_build 1 + +## enable systemd activation +%global systemd 1 + +%description +PipeWire is a multimedia server for Linux and other Unix like operating +systems. + +%package libs +Summary: Libraries for PipeWire clients +License: LGPLv2+ +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description libs +This package contains the runtime libraries for any application that wishes +to interface with a PipeWire media server. + +%package devel +Summary: Headers and libraries for PipeWire client development +License: LGPLv2+ +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +%description devel +Headers and libraries for developing applications that can communicate with +a PipeWire media server. + +%package doc +Summary: PipeWire media server documentation +License: LGPLv2+ + +%description doc +This package contains documentation for the PipeWire media server. + +%package utils +Summary: PipeWire media server utilities +License: LGPLv2+ +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%description utils +This package contains command line utilities for the PipeWire media server. + +%prep +%setup -q -T -b0 -n %{name}-%{version}%{?gitrel:-%{gitrel}-g%{shortcommit}} + +%patch0 -p1 -b .0000 +%patch1 -p1 -b .0001 + +%build +%meson -D docs=true -D man=true -D gstreamer=true -D systemd=true +%meson_build + +%install +%meson_install + +mkdir %{buildroot}%{_userunitdir}/sockets.target.wants +ln -s ../pipewire.socket %{buildroot}%{_userunitdir}/sockets.target.wants/pipewire.socket + +%check +%meson_test + +%pre +getent group pipewire >/dev/null || groupadd -r pipewire +getent passwd pipewire >/dev/null || \ + useradd -r -g pipewire -d %{_localstatedir}/run/pipewire -s /sbin/nologin -c "PipeWire System Daemon" pipewire +exit 0 + +%ldconfig_scriptlets + +%files +%license LICENSE GPL LGPL +%doc README +%if 0%{?systemd} +%{_userunitdir}/pipewire.* +%{_userunitdir}/sockets.target.wants/pipewire.socket +%endif +%{_bindir}/pipewire +%{_libdir}/libpipewire-%{apiversion}.so.* +%{_libdir}/gstreamer-1.0/libgstpipewire.* +%{_libdir}/pipewire-%{apiversion}/ +%{_libdir}/spa/ +%{_mandir}/man1/pipewire.1* +%{_sysconfdir}/pipewire/pipewire.conf + +%files libs +%license LICENSE GPL LGPL +%doc README +%dir %{_sysconfdir}/pipewire/ + +%files devel +%{_libdir}/libpipewire-%{apiversion}.so +%{_includedir}/pipewire/ +%{_includedir}/spa/ +%{_libdir}/pkgconfig/libpipewire-%{apiversion}.pc +%{_libdir}/pkgconfig/libspa-%{spaversion}.pc + +%files doc +%{_datadir}/doc/pipewire/html + +%files utils +%{_bindir}/pipewire-monitor +%{_bindir}/pipewire-cli +%{_mandir}/man5/pipewire.conf.5* +%{_mandir}/man1/pipewire-monitor.1* +%{_mandir}/man1/pipewire-cli.1* +%{_bindir}/spa-monitor +%{_bindir}/spa-inspect + +%changelog +* Fri Jan 11 2019 Wim Taymans - 0.2.5-1 +- Update to 0.2.5 +- Revert patch that requires too new meson +- Add patch to avoid invalid conversion error with C++ compilers +- Resolves: #1664569 + +* Fri Nov 30 2018 Wim Taymans - 0.2.4-1 +- Update to 0.2.4 +- Add defines for cursor and bitmap metadata +- Revert patch that requires too new meson +- Resolves: #1655028 + +* Thu Oct 18 2018 Wim Taymans - 0.2.3-2 +- Add systemd socket activation +- Resolves: #1639871 + +* Fri Oct 12 2018 Wim Taymans - 0.2.3-1 +- Update to 0.2.3 +- Resolves: #1638046 + +* Wed Aug 01 2018 Wim Taymans - 0.2.2-1 +- Update to 0.2.2 + +* Tue Feb 27 2018 Wim Taymans - 0.1.9-1 +- Update to 0.1.9 + +* Fri Feb 09 2018 Fedora Release Engineering - 0.1.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Feb 03 2018 Igor Gnatenko - 0.1.8-2 +- Switch to %%ldconfig_scriptlets + +* Tue Jan 23 2018 Wim Taymans - 0.1.8-1 +- Update to 0.1.8 + +* Fri Nov 24 2017 Wim Taymans - 0.1.7-1 +- Update to 0.1.7 +- Add to build when memfd_create is already defined + +* Fri Nov 03 2017 Wim Taymans - 0.1.6-1 +- Update to 0.1.6 + +* Tue Sep 19 2017 Wim Taymans - 0.1.5-2 +- Add patch to avoid segfault when probing + +* Tue Sep 19 2017 Wim Taymans - 0.1.5-1 +- Update to 0.1.5 + +* Thu Sep 14 2017 Kalev Lember - 0.1.4-3 +- Rebuilt for GNOME 3.26.0 megaupdate + +* Fri Sep 08 2017 Wim Taymans - 0.1.4-2 +- Install SPA hooks + +* Wed Aug 23 2017 Wim Taymans - 0.1.4-1 +- Update to 0.1.4 + +* Wed Aug 09 2017 Wim Taymans - 0.1.3-1 +- Update to 0.1.3 + +* Tue Jul 04 2017 Wim Taymans - 0.1.2-1 +- Update to 0.1.2 +- Added more build requirements +- Make separate doc package + +* Mon Jun 26 2017 Wim Taymans - 0.1.1-1 +- Update to 0.1.1 +- Add dbus-1 to BuildRequires +- change libs-devel to -devel + +* Wed Sep 9 2015 Wim Taymans - 0.1.0-2 +- Fix BuildRequires to use pkgconfig, add all dependencies found in configure.ac +- Add user and groups if needed +- Add license to %%licence + +* Tue Sep 1 2015 Wim Taymans - 0.1.0-1 +- First version