From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 22 Nov 2021 14:34:54 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mp9TC-0005NV-Sh for lore@lore.pengutronix.de; Mon, 22 Nov 2021 14:34:54 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mp9TC-0004xm-KY; Mon, 22 Nov 2021 14:34:54 +0100 Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28] helo=dude02.pengutronix.de.) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mp9SK-0004mo-UX for ptxdist@pengutronix.de; Mon, 22 Nov 2021 14:34:00 +0100 From: Philipp Zabel To: ptxdist@pengutronix.de Date: Mon, 22 Nov 2021 14:33:55 +0100 Message-Id: <20211122133355.1685566-2-p.zabel@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211122133355.1685566-1-p.zabel@pengutronix.de> References: <20211122133355.1685566-1-p.zabel@pengutronix.de> MIME-Version: 1.0 Subject: [ptxdist] [PATCH 2/2] media-session: new package X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Starting from PipeWire 0.3.39, pipewire-media-session was split out into its own standalone package. Include a backported patch to fix build with systemd system service enabled. Signed-off-by: Philipp Zabel --- ...remove-session-managers-option-check.patch | 32 +++++ patches/media-session-0.4.1/series | 1 + rules/media-session.in | 38 ++++++ rules/media-session.make | 126 ++++++++++++++++++ 4 files changed, 197 insertions(+) create mode 100644 patches/media-session-0.4.1/0001-meson-remove-session-managers-option-check.patch create mode 100644 patches/media-session-0.4.1/series create mode 100644 rules/media-session.in create mode 100644 rules/media-session.make diff --git a/patches/media-session-0.4.1/0001-meson-remove-session-managers-option-check.patch b/patches/media-session-0.4.1/0001-meson-remove-session-managers-option-check.patch new file mode 100644 index 000000000000..7def21649b0f --- /dev/null +++ b/patches/media-session-0.4.1/0001-meson-remove-session-managers-option-check.patch @@ -0,0 +1,32 @@ +From dfa740175c83e1cd0d815ad423f90872de566437 Mon Sep 17 00:00:00 2001 +From: James Hilliard +Date: Wed, 10 Nov 2021 08:54:06 -0700 +Subject: [PATCH] meson: remove session-managers option check. + +This option no longer exists and causes a build failure if building +with the systemd system service enabled. +--- + systemd/system/meson.build | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git a/systemd/system/meson.build b/systemd/system/meson.build +index ab0d49064986..0e9885b0f39f 100644 +--- a/systemd/system/meson.build ++++ b/systemd/system/meson.build +@@ -4,9 +4,7 @@ systemd_system_services_dir = systemd.get_variable(pkgconfig: 'systemdsystemunit + systemd_config = configuration_data() + systemd_config.set('PW_MEDIA_SESSION_BINARY', media_session_bindir / 'pipewire-media-session') + +-if get_option('session-managers').contains('media-session') +- configure_file(input : 'pipewire-media-session.service.in', +- output : 'pipewire-media-session.service', +- configuration : systemd_config, +- install_dir : systemd_system_services_dir) +-endif ++configure_file(input : 'pipewire-media-session.service.in', ++ output : 'pipewire-media-session.service', ++ configuration : systemd_config, ++ install_dir : systemd_system_services_dir) +-- +2.30.2 + diff --git a/patches/media-session-0.4.1/series b/patches/media-session-0.4.1/series new file mode 100644 index 000000000000..fef1ad945fb8 --- /dev/null +++ b/patches/media-session-0.4.1/series @@ -0,0 +1 @@ +0001-meson-remove-session-managers-option-check.patch diff --git a/rules/media-session.in b/rules/media-session.in new file mode 100644 index 000000000000..24a9012dec8c --- /dev/null +++ b/rules/media-session.in @@ -0,0 +1,38 @@ +## SECTION=multimedia_libs + +menuconfig MEDIA_SESSION + tristate + select HOST_MESON + select DBUS + select ALSA_LIB + select ALSA_LIB_PCM + select ALSA_LIB_UCM + select ALSA_LIB_SEQ + select PIPEWIRE + select PIPEWIRE_SYSTEMD_UNIT if MEDIA_SESSION_SYSTEMD_UNIT + select PIPEWIRE_SYSTEMD_UNIT_USER if MEDIA_SESSION_SYSTEMD_UNIT_USER + select SYSTEMD if MEDIA_SESSION_SYSTEMD + prompt "media-session " + help + Example session manager for PipeWire + +if MEDIA_SESSION + +config MEDIA_SESSION_SYSTEMD + bool + +config MEDIA_SESSION_SYSTEMD_UNIT + bool + default y + depends on INITMETHOD_SYSTEMD + select MEDIA_SESSION_SYSTEMD + prompt "install systemd system unit file for media-session" + +config MEDIA_SESSION_SYSTEMD_UNIT_USER + bool + default y + depends on INITMETHOD_SYSTEMD + select MEDIA_SESSION_SYSTEMD + prompt "install systemd user unit file for media-session" + +endif diff --git a/rules/media-session.make b/rules/media-session.make new file mode 100644 index 000000000000..2fac07834e25 --- /dev/null +++ b/rules/media-session.make @@ -0,0 +1,126 @@ +# -*-makefile-*- +# +# Copyright (C) 2021 by Philipp Zabel +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_MEDIA_SESSION) += media-session + +# +# Paths and names +# +MEDIA_SESSION_VERSION := 0.4.1 +MEDIA_SESSION_MD5 := 5f6d9e82330c8102f97b099f5269286f +MEDIA_SESSION := media-session-$(MEDIA_SESSION_VERSION) +MEDIA_SESSION_SUFFIX := tar.bz2 +MEDIA_SESSION_URL := \ + https://gitlab.freedesktop.org/pipewire/media-session/-/archive/$(MEDIA_SESSION_VERSION)/$(MEDIA_SESSION).$(MEDIA_SESSION_SUFFIX) +MEDIA_SESSION_SOURCE := $(SRCDIR)/$(MEDIA_SESSION).$(MEDIA_SESSION_SUFFIX) +MEDIA_SESSION_DIR := $(BUILDDIR)/$(MEDIA_SESSION) +MEDIA_SESSION_LICENSE := MIT AND LGPL-2.1-or-later AND GPL-2.0-only +MEDIA_SESSION_LICENSE_FILES := \ + file://LICENSE;md5=647cfa0f759d97b208bfb5c1eb912071 \ + file://COPYING;md5=97be96ca4fab23e9657ffa590b931c1a + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +MEDIA_SESSION_CONF_ENV := \ + PTXDIST_PKG_CONFIG_VAR_NO_SYSROOT=systemdsystemunitdir + +# +# meson +# +MEDIA_SESSION_CONF_TOOL := meson +MEDIA_SESSION_CONF_OPT := \ + $(CROSS_MESON_USR) \ + -Ddocdir= \ + -Ddocs=disabled \ + -Dinstalled_tests=disabled \ + -Dsystemd-system-service=$(call ptx/endis,PTXCONF_MEDIA_SESSION_SYSTEMD_UNIT)d \ + -Dsystemd-user-service=$(call ptx/endis,PTXCONF_MEDIA_SESSION_SYSTEMD_UNIT_USER)d \ + -Dsystemd-user-unit-dir= \ + -Dsystemd=$(call ptx/endis,PTXCONF_MEDIA_SESSION_SYSTEMD)d \ + -Dtests=disabled \ + -Dwith-module-sets= + +MEDIA_SESSION_CPPFLAGS = -isystem $(KERNEL_HEADERS_INCLUDE_DIR) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +MEDIA_SESSION_MODULES := \ + access \ + adapter \ + client-device \ + client-node \ + echo-cancel \ + filter-chain \ + link-factory \ + loopback \ + metadata \ + portal \ + profiler \ + protocol-native \ + protocol-pulse \ + rt \ + rtkit \ + session-manager \ + spa-device \ + spa-device-factory \ + spa-node \ + spa-node-factory + +MEDIA_SESSION_SPA_MODULES := \ + alsa/libspa-alsa \ + audiomixer/libspa-audiomixer \ + audiotestsrc/libspa-audiotestsrc \ + control/libspa-control \ + support/libspa-dbus \ + $(call ptx/ifdef,PTXCONF_MEDIA_SESSION_SYSTEMD,support/libspa-journal) \ + support/libspa-support \ + v4l2/libspa-v4l2 \ + videotestsrc/libspa-videotestsrc \ + volume/libspa-volume + +$(STATEDIR)/media-session.targetinstall: + @$(call targetinfo) + + @$(call install_init, media-session) + @$(call install_fixup, media-session,PRIORITY,optional) + @$(call install_fixup, media-session,SECTION,base) + @$(call install_fixup, media-session,AUTHOR,"Philipp Zabel ") + @$(call install_fixup, media-session,DESCRIPTION,missing) + + @$(call install_copy, media-session, 0, 0, 755, -, /usr/bin/pipewire-media-session) + +ifdef PTXCONF_MEDIA_SESSION_SYSTEMD_UNIT + @$(call install_alternative, media-session, 0, 0, 0644, \ + /usr/lib/systemd/system/pipewire-media-session.service) + @$(call install_link, media-session, ../pipewire-media-session.service, \ + /usr/lib/systemd/system/pipewire.service.wants/pipewire-media-session.service) +endif +ifdef PTXCONF_MEDIA_SESSION_SYSTEMD_UNIT_USER + @$(call install_alternative, media-session, 0, 0, 0644, \ + /usr/lib/systemd/user/pipewire-media-session.service) + @$(call install_link, media-session, ../pipewire-media-session.service, \ + /usr/lib/systemd/user/pipewire.service.wants/pipewire-media-session.service) +endif + + @$(call install_copy, media-session, 0, 0, 644, -, /usr/share/pipewire/media-session.d/alsa-monitor.conf) + @$(call install_copy, media-session, 0, 0, 644, -, /usr/share/pipewire/media-session.d/bluez-monitor.conf) + @$(call install_copy, media-session, 0, 0, 644, -, /usr/share/pipewire/media-session.d/media-session.conf) + @$(call install_copy, media-session, 0, 0, 644, -, /usr/share/pipewire/media-session.d/v4l2-monitor.conf) + + @$(call install_finish, media-session) + + @$(call touch) + +# vim: syntax=make -- 2.30.2 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de