diff options
Diffstat (limited to 'user/pulseaudio')
-rw-r--r-- | user/pulseaudio/APKBUILD | 132 | ||||
-rw-r--r-- | user/pulseaudio/pulseaudio.confd | 7 | ||||
-rw-r--r-- | user/pulseaudio/pulseaudio.initd | 81 | ||||
-rw-r--r-- | user/pulseaudio/pulseaudio.pre-install | 8 | ||||
l--------- | user/pulseaudio/pulseaudio.pre-upgrade | 1 |
5 files changed, 229 insertions, 0 deletions
diff --git a/user/pulseaudio/APKBUILD b/user/pulseaudio/APKBUILD new file mode 100644 index 000000000..8dbcdd0b6 --- /dev/null +++ b/user/pulseaudio/APKBUILD @@ -0,0 +1,132 @@ +# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: A. Wilcox <awilfox@adelielinux.org> +pkgname=pulseaudio +pkgver=12.0 +pkgrel=0 +pkgdesc="A featureful, general-purpose sound server" +url="https://www.freedesktop.org/wiki/Software/PulseAudio" +pkgusers="pulse" +pkggroups="pulse pulse-access" +arch="all" +options="!checkroot" +license="LGPL-2.1+" +makedepends="alsa-lib-dev bash bluez-dev check-dev dbus-dev eudev-dev fftw-dev + gconf-dev gtk+3.0-dev intltool libcap-dev libsndfile-dev m4 openssl-dev + orc-compiler orc-dev sbc-dev speexdsp-dev cmd:which" +checkdepends="check-dev" +install="$pkgname.pre-install $pkgname.pre-upgrade" +subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-bluez + $pkgname-alsa $pkgname-utils $pkgname-system:system:noarch + $pkgname-bash-completion:bashcomp:noarch $pkgname-lang + $pkgname-zsh-completion:zshcomp:noarch" +source="http://freedesktop.org/software/pulseaudio/releases/pulseaudio-$pkgver.tar.xz + $pkgname.initd + $pkgname.confd" + +build() { + cd "$builddir" + LIBS="-lintl" ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var \ + --enable-bluez5 \ + --disable-bluez4 \ + --enable-nls \ + --enable-orc \ + --enable-largefile \ + --disable-solaris \ + --enable-default-build-tests \ + --enable-udev \ + --enable-ipv6 \ + --enable-gconf \ + --with-fftw + make +} + +check() { + cd "$builddir" + make check +} + +package() { + cd "$builddir" + make -j1 DESTDIR="$pkgdir" install +} + +system() { + depends="$pkgname" + pkgdesc="PulseAudio system-wide init scripts" + replaces="$pkgname-openrc" + install -D -m755 "$srcdir"/$pkgname.initd \ + "$subpkgdir"/etc/init.d/$pkgname + install -D -m644 "$srcdir"/$pkgname.confd \ + "$subpkgdir"/etc/conf.d/$pkgname + mv "$pkgdir"/etc/dbus-1 "$subpkgdir"/etc +} + +libs() { + pkgdesc="PulseAudio libraries" + mkdir -p "$subpkgdir"/usr/lib \ + "$subpkgdir"/etc/pulse + mv "$pkgdir"/usr/lib/pulseaudio \ + "$subpkgdir"/usr/lib/ + mv "$pkgdir"/usr/lib/libpulse.so.0* \ + "$pkgdir"/usr/lib/libpulse-simple.so.0* \ + "$subpkgdir"/usr/lib/ + mv "$pkgdir"/etc/pulse/client.conf \ + "$subpkgdir"/etc/pulse/ +} + +bluez() { + pkgdesc="PulseAudio Bluetooth support" + 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/ +} + +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/ +} + +utils() { + pkgdesc="PulseAudio utilities" + mkdir -p "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/bin/pa* \ + "$pkgdir"/usr/bin/esdcompat \ + "$subpkgdir"/usr/bin/ +} + +zeroconf() { + pkgdesc="PulseAudio zeroconf support" + mkdir -p "$subpkgdir"/usr/lib/pulse-$pkgver/modules + 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/ +} + +bashcomp() { + pkgdesc="Bash completion for $pkgname" + install_if="$pkgname=$pkgver-r$pkgrel bash-completion" + install -dm755 "$subpkgdir"/usr/share + mv "$pkgdir"/usr/share/bash-completion "$subpkgdir"/usr/share +} + +zshcomp() { + pkgdesc="Zsh completion for $pkgname" + install_if="$pkgname=$pkgver-r$pkgrel zsh" + install -dm755 "$subpkgdir"/usr/share + mv "$pkgdir"/usr/share/zsh "$subpkgdir"/usr/share +} + +sha512sums="e9b02522f1e9cc2cf2e9db3364153fff5bc70561df34bc8e254e373a24c45585c1c722de8b6ebd7cd1814f523cf29b67c6940390a6fcc1ccbdde5aeff48f8d8c pulseaudio-12.0.tar.xz +34fe54ece5df60ce63a7955cd828a2716670fef71f40960698ae5518fdaf9cd599f4d8f8852e2c88d715600a9ad06a38984415e5eb320071012e5eb6e5c1b8b1 pulseaudio.initd +75b54581591519d63a3362b155c0f9b0501a60763ab394693a456c44d0216138cf3a40bdd0f7442028663bc045e9ffee286f8f8eaf2ee3bb17379b43615fee0e pulseaudio.confd" diff --git a/user/pulseaudio/pulseaudio.confd b/user/pulseaudio/pulseaudio.confd new file mode 100644 index 000000000..1d31d342a --- /dev/null +++ b/user/pulseaudio/pulseaudio.confd @@ -0,0 +1,7 @@ +# Config file for /etc/init.d/pulseaudio +# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/files/pulseaudio.conf.d,v 1.6 2006/07/29 15:34:18 flameeyes Exp $ + +# For more see "pulseaudio -h". + +# Startup options +PA_OPTS="--log-target=syslog --disallow-module-loading=1" diff --git a/user/pulseaudio/pulseaudio.initd b/user/pulseaudio/pulseaudio.initd new file mode 100644 index 000000000..6dc11bf82 --- /dev/null +++ b/user/pulseaudio/pulseaudio.initd @@ -0,0 +1,81 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/files/pulseaudio.init.d-5,v 1.1 2011/03/27 16:58:49 ssuominen Exp $ + +depend() { + need localmount + use net + + local script="/etc/pulse/system.pa" + + for opt in ${PA_OPTS}; do + case "$opt" in + --file=*) script="${opt#*=}" ;; + -F*) script="${opt#-F}" ;; + esac + done + + config "$script" + + local needs="$(get_options need)" + if [ -n "${needs}" ]; then + need ${needs} + return + fi + + if egrep -q '^[[:space:]]*load-module[[:space:]]+module-console-kit' "$script"; then + needs="${needs} consolekit" + fi + +#ifdef UDEV + if egrep -q '^[[:space:]]*load-module[[:space:]]+module-udev-detect' "$script"; then + needs="${needs} udev" + fi +#endif + +#ifdef AVAHI + if egrep -q '^[[:space:]]*load-module[[:space:]]+module-zeroconf-publish' "$script"; then + needs="${needs} avahi-daemon" + fi +#endif + +#ifdef BLUETOOTH + if egrep -q '^[[:space:]]*load-module[[:space:]]+module-bt-proximity' "$script"; then + needs="${needs} bluetooth" + fi +#endif + +#ifdef ALSA + if egrep -q '^[[:space:]]*load-module[[:space:]]+module-alsa-(sink|source)' "$script" || + egrep -q '^[[:space:]]*load-module[[:space:]]+module-(udev-)?detect' "$script" || + egrep -q '^[[:space:]]*add-autoload-source[[:space:]]+(input|output)[[:space:]]+module-alsa-(sink|source)' "$script"; then + needs="${needs} alsa" # in Alpine install alsa-utils to provide /etc/init.d/alsa (not alsasound as in Gentoo). + fi +#endif + + need "${needs}" + save_options need "${needs}" +} + +start() { + if [ -z "${PULSEAUDIO_SHOULD_NOT_GO_SYSTEMWIDE}" ]; then + eerror "Please don't use system wide PulseAudio unless you read the" + eerror "documentation available at http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/" + eerror "" + eerror "When you're done, please set the variable PULSEAUDIO_SHOULD_NOT_GO_SYSTEMWIDE in" + eerror "/etc/conf.d/pulseaudio . Please remember that upstream does not support this mode" + eerror "when used for standard desktop configurations." + return 1 + fi + ebegin "Starting pulseaudio" + PA_ALL_OPTS="${PA_OPTS} --fail=1 --daemonize=1 --system" + start-stop-daemon --start --exec /usr/bin/pulseaudio -- ${PA_ALL_OPTS} + eend $? +} + +stop() { + ebegin "Stopping pulseaudio" + start-stop-daemon --stop --quiet --exec /usr/bin/pulseaudio --pidfile /var/run/pulse/pid + eend $? +} diff --git a/user/pulseaudio/pulseaudio.pre-install b/user/pulseaudio/pulseaudio.pre-install new file mode 100644 index 000000000..7a1a18d59 --- /dev/null +++ b/user/pulseaudio/pulseaudio.pre-install @@ -0,0 +1,8 @@ +#!/bin/sh + +addgroup -S pulse 2>/dev/null +addgroup -S pulse-access 2>/dev/null +adduser -S -D -H -h /var/empty -s /sbin/nologin -G pulse -g "PulseAudio daemon" pulse 2>/dev/null +addgroup pulse pulse-access 2>/dev/null + +exit 0 diff --git a/user/pulseaudio/pulseaudio.pre-upgrade b/user/pulseaudio/pulseaudio.pre-upgrade new file mode 120000 index 000000000..03b06080d --- /dev/null +++ b/user/pulseaudio/pulseaudio.pre-upgrade @@ -0,0 +1 @@ +pulseaudio.pre-install
\ No newline at end of file |