Commit 16d9d254 authored by Leo's avatar Leo Committed by Kevin Daudt

community/pulseaudio: fix and modernize

- Add support for X11 (adds start-pulseaudio-x11 binary)
- Fix license
- remove pulseaudio-libs and replace libpulse
- add libpulse-mainloop-glib, moving the library from pulseaudio
- Add post-install to create proper groups and users
- enable eudev integration
- adopt modern style
- Disable esound compat
parent ce7ef2d5
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Pedro Filipe <xpecex@outlook.com>
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=pulseaudio
pkgver=12.2
pkgrel=1
pkgrel=2
pkgdesc="A featureful, general-purpose sound server"
url="http://www.freedesktop.org/wiki/Software/PulseAudio"
arch="all !s390x"
license="LGPL"
makedepends="m4 automake libtool intltool bash
dbus-dev libcap-dev alsa-lib-dev bluez-dev speexdsp-dev avahi-dev openssl-dev eudev-dev
libsndfile-dev gtk+3.0-dev json-c-dev fftw-dev gconf-dev sbc-dev jack-dev libatomic_ops-dev gettext-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-bluez
$pkgname-alsa $pkgname-utils $pkgname-jack $pkgname-zeroconf $pkgname-system
$pkgname-bash-completion:bashcomp $pkgname-zsh-completion:zshcomp"
license="LGPL-2.1-or-later"
makedepends="m4 automake libtool intltool bash dbus-dev libcap-dev alsa-lib-dev
bluez-dev speexdsp-dev avahi-dev openssl-dev eudev-dev libsndfile-dev
gtk+3.0-dev json-c-dev fftw-dev sbc-dev jack-dev libatomic_ops-dev gettext-dev
eudev-dev autoconf autoconf-archive libsm-dev libice-dev xcb-util-dev libx11-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-bluez libpulse:_libpulse
libpulse-mainloop-glib:_libpulse_mainloop_glib $pkgname-alsa $pkgname-utils
$pkgname-jack $pkgname-zeroconf $pkgname-openrc
$pkgname-bash-completion:bashcomp:noarch $pkgname-zsh-completion:zshcomp:noarch"
install="pulseaudio.post-install"
source="https://freedesktop.org/software/pulseaudio/releases/pulseaudio-$pkgver.tar.xz
$pkgname.initd
$pkgname.confd"
$pkgname.confd
disable-desktop.patch"
options="!check" # The volume-test may fail for unknown reasons
builddir="$srcdir"/$pkgname-$pkgver
prepare() {
NOCONFIGURE=1 ./bootstrap.sh
default_prepare
}
build() {
cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
......@@ -37,37 +43,53 @@ build() {
--disable-bluez4 \
--disable-nls \
--disable-orc \
|| return 1
make || return 1
--disable-gconf \
--disable-oss-output \
--disable-oss-wrapper \
--disable-tcpwrapper \
--disable-systemd-daemon \
--disable-systemd-journal \
--with-udev-rules-dir=/usr/lib/udev/rules.d \
--disable-rpath \
--disable-esound \
--disable-hal-compat \
--enable-x11 \
DATADIRNAME=share
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
package() {
cd "$builddir"
make -j1 DESTDIR="$pkgdir" install || return 1
make -j1 DESTDIR="$pkgdir" install
}
system() {
arch="noarch"
depends="$pkgname"
pkgdesc="Pulseaudio system-wide init scripts"
install -D -m755 "$srcdir"/$pkgname.initd \
"$subpkgdir"/etc/init.d/$pkgname || return 1
install -D -m644 "$srcdir"/$pkgname.confd \
"$subpkgdir"/etc/conf.d/$pkgname || return 1
openrc() {
replaces="$pkgname-system" # Backward compatibility
default_openrc
mkdir -p "$subpkgdir"/etc
mv "$pkgdir"/etc/dbus-1 "$subpkgdir"/etc
}
libs() {
_libpulse() {
replaces="$pkgname-libs"
pkgdesc="Pulseaudio libraries"
mkdir -p "$subpkgdir"/usr/lib \
"$subpkgdir"/etc/pulse || return 1
"$subpkgdir"/etc/pulse
mv "$pkgdir"/usr/lib/pulseaudio \
"$subpkgdir"/usr/lib/ || return 1
"$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libpulse.so.0* \
"$pkgdir"/usr/lib/libpulse-simple.so.0* \
"$subpkgdir"/usr/lib/ || return 1
"$subpkgdir"/usr/lib/
mv "$pkgdir"/etc/pulse/client.conf \
"$subpkgdir"/etc/pulse/ || return 1
"$subpkgdir"/etc/pulse/
}
_libpulse_mainloop_glib() {
pkgdesc="Pulseaudio mainloop-glib library"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libpulse-mainloop-glib.so.* "$subpkgdir"/usr/lib
}
bluez() {
......@@ -75,29 +97,28 @@ bluez() {
mkdir -p "$subpkgdir"/usr/lib/pulse-$pkgver/modules
mv "$pkgdir"/usr/lib/pulse-$pkgver/modules/*bluez*.so \
"$pkgdir"/usr/lib/pulse-$pkgver/modules/*bluetooth*.so \
"$subpkgdir"/usr/lib/pulse-$pkgver/modules/ || return 1
"$subpkgdir"/usr/lib/pulse-$pkgver/modules/
}
alsa() {
pkgdesc="Pulseaudio alsa support"
mkdir -p "$subpkgdir"/usr/lib/pulse-$pkgver/modules
mv "$pkgdir"/usr/lib/pulse-$pkgver/modules/*alsa*.so \
"$subpkgdir"/usr/lib/pulse-$pkgver/modules/ || return 1
"$subpkgdir"/usr/lib/pulse-$pkgver/modules/
}
utils() {
pkgdesc="Pulseaudio utilities"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/pa* \
"$pkgdir"/usr/bin/esdcompat \
"$subpkgdir"/usr/bin/ || return 1
"$subpkgdir"/usr/bin/
}
jack() {
pkgdesc="Pulseaudio jack support"
mkdir -p "$subpkgdir"/usr/lib/pulse-$pkgver/modules
mv "$pkgdir"/usr/lib/pulse-$pkgver/modules/*jack*.so \
"$subpkgdir"/usr/lib/pulse-$pkgver/modules/ || return 1
"$subpkgdir"/usr/lib/pulse-$pkgver/modules/
}
zeroconf() {
......@@ -106,27 +127,26 @@ zeroconf() {
mv "$pkgdir"/usr/lib/pulse-$pkgver/modules/*avahi*.so \
"$pkgdir"/usr/lib/pulse-$pkgver/modules/*zeroconf*.so \
"$pkgdir"/usr/lib/pulse-$pkgver/modules/*raop*.so \
"$subpkgdir"/usr/lib/pulse-$pkgver/modules/ || return 1
"$subpkgdir"/usr/lib/pulse-$pkgver/modules/
}
bashcomp() {
pkgdesc="Bash completion for $pkgname"
arch="noarch"
depends=""
pkgdesc="Bash completion for $pkgname"
install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
install -dm755 "$subpkgdir"/usr/share || return 1
install -dm755 "$subpkgdir"/usr/share
mv "$pkgdir"/usr/share/bash-completion "$subpkgdir"/usr/share
}
zshcomp() {
pkgdesc="Zsh completion for $pkgname"
arch="noarch"
depends=""
pkgdesc="Zsh completion for $pkgname"
install_if="$pkgname=$pkgver-r$pkgrel zsh"
install -dm755 "$subpkgdir"/usr/share || return 1
install -dm755 "$subpkgdir"/usr/share
mv "$pkgdir"/usr/share/zsh "$subpkgdir"/usr/share
}
sha512sums="877754c1838b3cb042dbc18a5f1cc3cf313ffcaee7a64703330406d1f86279c34f1107634ac3083b158365e6757fbacf5ec406bc3c5788d291de67b77a561a4e pulseaudio-12.2.tar.xz
34fe54ece5df60ce63a7955cd828a2716670fef71f40960698ae5518fdaf9cd599f4d8f8852e2c88d715600a9ad06a38984415e5eb320071012e5eb6e5c1b8b1 pulseaudio.initd
75b54581591519d63a3362b155c0f9b0501a60763ab394693a456c44d0216138cf3a40bdd0f7442028663bc045e9ffee286f8f8eaf2ee3bb17379b43615fee0e pulseaudio.confd"
75b54581591519d63a3362b155c0f9b0501a60763ab394693a456c44d0216138cf3a40bdd0f7442028663bc045e9ffee286f8f8eaf2ee3bb17379b43615fee0e pulseaudio.confd
11aaa7a1f015ae2b99c2a74f1d2646b51df4a2243c0d44795abbfb9892b9c34ceb37902f0eefa206790d375bd3945cfefaa381e00f4e846cd325b9344328282b disable-desktop.patch"
Fixes build failure
diff --git a/src/Makefile.am b/src/Makefile.am
index f4464d2..acd2381 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -105,7 +105,6 @@ EXTRA_DIST = \
daemon/systemd/user/pulseaudio.socket \
utils/padsp.in \
utils/qpaeq \
- daemon/pulseaudio.desktop.in \
map-file \
daemon/pulseaudio-system.conf \
modules/echo-cancel/adrian-license.txt \
@@ -123,14 +122,6 @@ dbuspolicy_DATA = \
daemon/pulseaudio-system.conf
endif
-if HAVE_X11
-xdgautostart_in_files = \
- daemon/pulseaudio.desktop.in
-xdgautostart_DATA = $(xdgautostart_in_files:.desktop.in=.desktop)
-@INTLTOOL_DESKTOP_RULE@
-endif
-
-
###################################
# Includes #
###################################
@@ -2189,7 +2180,6 @@ module_allow_passthrough_la_CFLAGS = $(AM_CFLAGS) -DPA_MODULE_NAME=module_allow_
# Some minor stuff #
###################################
-CLEANFILES += daemon/pulseaudio.desktop
DISTCLEANFILES = esdcompat client.conf default.pa system.pa daemon.conf start-pulseaudio-x11 pulseaudio.service
if OS_IS_WIN32
#!/bin/sh
# Alpine Linux post-install script for socklog
# Copyright 2019 Leo (thinkabit.ukim@gmail.com)
# Distributed under the terms of the GNU General Public License, v2 or later
addgroup -S pulse-access 2>/dev/null
addgroup -S pulse 2>/dev/null
adduser -S -D -H -h /var/run/pulse -g "PulseAudio daemon" -G pulse pulse 2>/dev/null
adduser pulse audio 2>/dev/null
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment