#! /bin/bash # Pulseaudio # Source: https://www.freedesktop.org/software/pulseaudio/releases/pulseaudio-17.0.tar.xz # # $BUILD = Directory to temporarily install # $PKGS = Directory to store built packages # # DEPS # Required: libsndfile # Recommended: alsa-lib, dbus, elogind, Glib, libcap-pam, speex, Xorg-libraries(xcb,ice,sm) # Optional: Avahi, Bluez, fftw, GConf, GTK+-3, libsamplerate, SBC, Valgrind, JACK, # Optional libasyncns, LIRC, ORC, soxr, TDB, WebRTC AudioProcessing and XEN # If optimizing with GCC: export CFLAGS="-march=native -pipe " export CFLAGS+="-O3 -falign-functions=32 -fno-lto " export CFLAGS+="-fno-math-errno -fno-semantic-interposition -fno-trapping-math " # If GTK3 has no X11 support, it must be disabled -Dgtk=disabled mkdir BUILD && cd BUILD && # If building with LLVM-17's LLD, set the LDFLAGS # https://github.com/termux/termux-packages/issues/18761#issuecomment-1864098542 LDFLAGS="-Wl,--undefined-version" \ # If building with clang-17, add CFLAG CFLAGS="-Wno-incompatible-function-pointer-types " \ meson --prefix=/usr \ -Dbuildtype=release \ -Dgcov=false \ -Dman=true \ -Dtests=true \ -Dsystem_user=pulse \ -Dsystem_group=pulse \ -Dalsa=enabled \ -Dbluez5=enabled \ -Ddbus=enabled \ -Dfftw=enabled \ -Dglib=enabled \ -Dgsettings=enabled \ -Dhal-compat=false \ -Dipv6=true \ -Dopenssl=enabled \ -Dorc=enabled \ -Dsamplerate=disabled \ -Dspeex=enabled \ -Dsystemd=disabled \ -Dudev=enabled \ -Dx11=enabled \ -Ddatabase=gdbm \ -Ddoxygen=false \ -Dudevrulesdir=/usr/lib/udev/rules.d .. && read -p "Compile?" && ninja -j2 && sudo -S DESTDIR=$BUILD ninja install && sudo -S mkdir -pv /BMAN/install sudo -S mkdir -pv /BMAN/usr/share sudo -S mv $BUILD/usr/share/man /BMAN/usr/share/ cd $BUILD && sudo -S mkdir -v ${BUILD}/install && cat > /tmp/slack-desc << "EOF" # HOW TO EDIT THIS FILE: # The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' # on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| pulseaudio: pulseaudio (Sound Server) pulseaudio: pulseaudio: pulseaudio is a networked sound server for Linux and other pulseaudio: Unix like operating systems and Microsoft Windows. It is pulseaudio: intended to be an improved drop-in replacement for the pulseaudio: Enlightened Sound Daemon (ESOUND). pulseaudio: pulseaudio: Homepage: http://pulseaudio.org pulseaudio: pulseaudio: pulseaudio: EOF sudo -S mv -v /tmp/slack-desc install/ && sudo -S sed -e '/flat-volumes/iflat-volumes = no' -i etc/pulse/daemon.conf && sudo -S sed -e 's|/usr/bin/pactl load-module module-x11-cork-request|#&|' \ -i usr/bin/start-pulseaudio-x11 && sudo -S sed -e '/Load several protocols/aload-module module-dbus-protocol' \ -i etc/pulse/default.pa && sudo -S makepkg -l y -c n $PKGS/pulseaudio-17.0-$PSUFFIX && cd /BMAN cat > /tmp/slack-desc << "EOF" pulseaudio-doc: Manuals for pulseaudio (Sound Server) pulseaudio-doc: pulseaudio-doc: A networked sound server for Linux and other Unix like operating pulseaudio-doc: systems and Microsoft Windows. It is intended to be an improved pulseaudio-doc: drop-in replacement for the Enlightened Sound Daemon (ESOUND). pulseaudio-doc: pulseaudio-doc: http://pulseaudio.org pulseaudio-doc: EOF sudo -S mv -v /tmp/slack-desc install/ && sudo -S makepkg -l y -c n $PKGS/pulseaudio-doc-17.0-$NOPSUFFIX sudo -S rm -rf /BMAN/* sudo -S rm -rf ${BUILD}/*