# pulseaudio/cfg - "Build" settings for package #--------------------------------------------------------------------- [technotes] 1. "pulseaudio" is fragile, confusing, and flaky. Laclin added it mostly to get "pavucontrol". One big problem with "pulseaudio" is that you need to use a special "system" mode in order to get sound in "su" or "sudo" xterms and/or in concurrent login sessions to different accounts. If the special "system" mode is deprecated by the upstream developers, "pulseaudio" should probably be dropped. #--------------------------------------------------------------------- 2. A user named "pulse" should exist. Groups named "audio" and "pulse" should exist as well. "pulse" should be a member of the "audio" group. Sample "/etc/passwd" line for the "pulse" user: pulse:x:65:65:PulseAudio User:/var/pulseaudio/run/pulse:/bin/false Sample command to add the "pulse" user to the "audio" group: usermod -G audio pulse || true #--------------------------------------------------------------------- 3. "with access group" doesn't seem to work. We patch things so as to use anonymous authorization instead. #--------------------------------------------------------------------- 4. Required addition to "default.pa": load-module module-alsa-source tsched=0 load-module module-alsa-sink tsched=0 #--------------------------------------------------------------------- [buildtimes] 00.01 hours (or 000.83 minutes) - ThinkPad L390 i5 4x2 24GB RAM 00.06 hours (or 003.42 minutes) - HP EliteBook 8560w 32GB RAM 00.17 hours (or 010.13 minutes) - ThinkPad E540 i7 4x2 16GB RAM #--------------------------------------------------------------------- [settings] exepack = yes license = See "license*.txt" in installed tree licfile = LICENSE nosyslinks = lib setpaths = alsa gtkcore jackone openssl pulseaudio xorg #--------------------------------------------------------------------- [depends] actools alsa-lib alsa-oss alsa-utils attr bluez cpan-xml-parser db eudev:strict fftw flac gawk grep gstreame:forward gtkcore intltool:forward jackone lame libbsd libcap libogg liborc libsbc libsndfile libsoxr libvorbis meson ncurses ninja openssl opus pcre2 pkgconf sed speex speexdsp tcp-wrappers tdb util-linux valgrind xorg #--------------------------------------------------------------------- [configure] killany -qw "pulseaudio -v" ETCDIR=$PKGDIR_PROD/etc VARDIR=/var/pulseaudio chown -R 0.0 . mkdir -p $ETCDIR $VARDIR #--------------------------------------------------------------------- BZGS=disabled if [ -d $PRODTREE/gstreamer ]; then BZGS=enabled; fi PATH=$PRODTREE/python3/bin:$PATH PP=$PKGDIR_PROD rm -fr build && mkdir build && cd build # meson setup \ -D prefix=$PP \ -D access_group=audio \ -D adrian-aec=false \ -D alsa=enabled \ -D dbus=enabled \ -D fftw=enabled \ -D gcov=false \ -D glib=enabled \ -D gsettings=disabled \ -D gstreamer=disabled \ -D gtk=enabled \ -D man=true \ -D soxr=enabled \ -D speex=enabled \ -D system_group=pulse \ -D system_user=pulse \ -D systemd=disabled \ -D tests=false \ -D udev=enabled \ -D x11=enabled \ \ -D bluez5=enabled \ -D bluez5-gstreamer=$BZGS \ -D bluez5-native-headset=true \ -D bluez5-ofono-headset=true #--------------------------------------------------------------------- [build] BINDIR=$PKGDIR_PROD/bin ETCDIR=$PKGDIR_PROD/etc LIBDIR=$PKGDIR_PROD/lib mkdir -p $BINDIR $ETCDIR $LIBDIR cd build ninja && ninja install #--------------------------------------------------------------------- [postbuild] BINDIR=$PKGDIR_PROD/bin ETCDIR=$PKGDIR_PROD/etc LIBDIR=$PKGDIR_PROD/lib mkdir -p $ETCDIR/pulse/default.pa.d cd $LIBDIR ln -nsf pulseaudio/* . ln -nsf pulseaudio/modules/* . mkdir -p /etc/default cat > /etc/default/pulse << END PULSEAUDIO_SYSTEM_START=1 END mkdir -p /etc/profile.d cat > /etc/profile.d/pulseaudio.sh << END export PULSE_RUNTIME_PATH=/var/pulseaudio/run/pulse export PULSE_STATE_PATH=\$PULSE_RUNTIME_PATH/state END # Note: # HOME for user "pulse" is /var/pulseaudio/run/pulse rm -fr /etc/dbus-1/system.d/pulseaudio-system.conf #--------------------------------------------------------------------- pushd $ETCDIR/pulse sed -e 's@^;*.*autospawn.*@autospawn = no@' \ -e 's@^;*.*daemon-binary.*@daemon-binary = /bin/true@' \ -i client.conf sed -e 's@^;*.*flat-volumes@flat-volumes = no@' \ -e 's@^;*.*daemon-binary.*@daemon-binary = /bin/true@' \ -i daemon.conf sed -e '/load-module module-console-kit/s/^/#/' \ -i default.pa sed -e \ 's@\(module module-native-protocol-unix\)@\1 auth-anonymous=true@' \ -e 's@^ *\(load-module module-suspend-on-idle\)@# \1@' \ -i system.pa popd #--------------------------------------------------------------------- pushd $BINDIR chmod u+s pulseaudio chown pulse.pulse pacmd chmod u+s pacmd chmod g+s pacmd popd #--------------------------------------------------------------------- [setup.bash] export PULSE_RUNTIME_PATH=/var/pulseaudio/run/pulse export PULSE_STATE_PATH=$PULSE_RUNTIME_PATH/state #--------------------------------------------------------------------- [setup.boot] # "/etc/rc.d/rc.local" executes this script at boot time. This script # configures "pulseaudio". # This needs to take place after ALSA setup, which should be the case # since that is done at an earlier stage. # Note: This script is executed, not "sourced". bluetoothd-restart L=$PRODTREE/pulseaudio/lib/pulseaudio/modules:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$L export PULSE_RUNTIME_PATH=/var/pulseaudio/run/pulse export PULSE_STATE_PATH=$PULSE_RUNTIME_PATH/state NN=`ps ax | grep makelac | grep -v grep | wc -l` if [ "x$NN" == "x0" ]; then killany -qw "pavucontrol" || true killany -qw "pulseaudio -v" || true fi VPA=/var/pulseaudio VPALOG=$VPA/pulseaudio.log rm -fr $VPA mkdir -p $VPA/{.config,lib,run/pulse} touch $VPALOG chown -R pulse.pulse $VPA chmod 755 $VPA HOME=$VPA XDG_CONFIG_HOME=$VPA/.config \ pulseaudio -vv --system >> $VPA/pulseaudio.log 2>&1 & sleep 2 timeout 5 pacmd load-module module-bluetooth-policy & timeout 5 pacmd load-module module-bluetooth-discover & sleep 3 timeout 5 bluetooth-connect sleep 3 killany -qw pavucontrol sleep 1 pavucontrol & sleep 2 killany -qw audacious audacious & #--------------------------------------------------------------------- # Original URLs. These URLs were valid at one point, but may have died # since then. If you download newer versions of tarballs [etc.], don't # delete the original versions, as you may not be able to replace # them. [urls] url_debian = tbd url_home = tbd url_lfs = tbd url_tarball = https://www.freedesktop.org/software/pulseaudio/\ releases/pulseaudio-16.2.tar.xz #--------------------------------------------------------------------- [history] 171119 Added package. Started with 11.1. 180623 Updated to 12.0 180715 Updated to 12.1 180716 Updated to 12.2 190412 Updated to f08443e18 ("git" hash) 210126 Updated to c6309a9c1 210313 Updated to 4d7242d83 240317 Updated to 14.2 241113 Updated to 16.2 241117 Modified to support Bluetooth