distribution/packages/audio/pulseaudio/package.mk

106 lines
4.1 KiB
Makefile
Raw Normal View History

2022-02-05 14:23:32 +00:00
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="pulseaudio"
PKG_VERSION="15.0"
PKG_SHA256="a40b887a3ba98cc26976eb11bdb6613988f145b19024d1b6555c6a03c9cba1a0"
2022-02-05 14:23:32 +00:00
PKG_LICENSE="GPL"
PKG_SITE="http://pulseaudio.org/"
PKG_URL="http://www.freedesktop.org/software/pulseaudio/releases/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_TARGET="toolchain alsa-lib dbus libcap libsndfile libtool openssl soxr speexdsp systemd glib:host glib"
PKG_LONGDESC="PulseAudio is a sound system for POSIX OSes, meaning that it is a proxy for your sound applications."
if [ "${BLUETOOTH_SUPPORT}" = "yes" ]; then
PKG_DEPENDS_TARGET+=" sbc bluez"
PKG_PULSEAUDIO_BLUETOOTH="-Dbluez5=enabled"
2022-02-05 14:23:32 +00:00
else
PKG_PULSEAUDIO_BLUETOOTH="-Dbluez5=disabled"
2022-02-05 14:23:32 +00:00
fi
if [ "${AVAHI_DAEMON}" = "yes" ]; then
PKG_DEPENDS_TARGET+=" avahi"
PKG_PULSEAUDIO_AVAHI="-Davahi=enabled"
else
PKG_PULSEAUDIO_AVAHI="-Davahi=disabled"
fi
PKG_MESON_OPTS_TARGET="-Ddaemon=true \
-Ddoxygen=false \
-Dgcov=false \
2022-02-05 14:23:32 +00:00
-Dman=false \
-Dtests=false \
-Dsystem_user=root \
-Dsystem_group=root \
-Daccess_group=root \
-Ddatabase=simple \
-Dlegacy-database-entry-format=false \
-Dstream-restore-clear-old-devices=false \
2022-02-05 14:23:32 +00:00
-Drunning-from-build-tree=false \
-Datomic-arm-linux-helpers=true \
-Datomic-arm-memory-barrier=false \
-Dmodlibexecdir=/usr/lib/pulse \
-Dudevrulesdir=/usr/lib/udev/rules.d \
-Dalsa=enabled \
-Dasyncns=disabled \
${PKG_PULSEAUDIO_AVAHI} \
${PKG_PULSEAUDIO_BLUETOOTH} \
2023-01-28 11:50:43 +00:00
-Dbluez5-gstreamer=disabled \
-Dbluez5-native-headset=true \
-Dbluez5-ofono-headset=true \
2022-02-05 14:23:32 +00:00
-Ddbus=enabled \
-Delogind=disabled \
2022-02-05 14:23:32 +00:00
-Dfftw=disabled \
-Dglib=enabled \
-Dgsettings=disabled \
-Dgstreamer=disabled \
2022-02-05 14:23:32 +00:00
-Dgtk=disabled \
-Dhal-compat=false \
-Dipv6=true \
-Djack=disabled \
-Dlirc=disabled \
-Dopenssl=enabled \
-Dorc=disabled \
-Doss-output=disabled \
2022-02-05 14:23:32 +00:00
-Dsamplerate=disabled \
-Dsoxr=enabled \
-Dspeex=enabled \
-Dsystemd=enabled \
-Dtcpwrap=disabled \
2022-02-05 14:23:32 +00:00
-Dudev=enabled \
-Dvalgrind=disabled \
2022-02-05 14:23:32 +00:00
-Dx11=disabled \
-Dadrian-aec=true \
-Dwebrtc-aec=disabled"
pre_configure_target() {
sed -e 's|; remixing-use-all-sink-channels = yes|; remixing-use-all-sink-channels = no|' \
-i ${PKG_BUILD}/src/daemon/daemon.conf.in
}
post_makeinstall_target() {
safe_remove ${INSTALL}/usr/include
safe_remove ${INSTALL}/usr/lib/cmake
safe_remove ${INSTALL}/usr/lib/pkgconfig
safe_remove ${INSTALL}/usr/lib/systemd
safe_remove ${INSTALL}/usr/share/vala
safe_remove ${INSTALL}/usr/share/zsh
safe_remove ${INSTALL}/usr/share/bash-completion
cp ${PKG_DIR}/config/system.pa ${INSTALL}/etc/pulse/
sed 's/user="pulse"/user="root"/' -i ${INSTALL}/etc/dbus-1/system.d/pulseaudio-system.conf
2022-02-05 14:23:32 +00:00
mkdir -p ${INSTALL}/usr/config
cp -PR ${PKG_DIR}/config/pulse-daemon.conf.d ${INSTALL}/usr/config
ln -sf /storage/.config/pulse-daemon.conf.d ${INSTALL}/etc/pulse/daemon.conf.d
mkdir -p ${INSTALL}/etc/ld.so.conf.d
echo "/usr/lib/pulseaudio" >${INSTALL}/etc/ld.so.conf.d/${ARCH}-lib-pulseaudio.conf
2022-02-05 14:23:32 +00:00
}
# Deprecated by pipewire
#post_install() {
# enable_service pulseaudio.service
#}