diff options
-rw-r--r-- | testing/pulseaudio/APKBUILD | 31 | ||||
-rw-r--r-- | testing/pulseaudio/pulseaudio.confd | 7 | ||||
-rw-r--r-- | testing/pulseaudio/pulseaudio.initd | 81 |
3 files changed, 113 insertions, 6 deletions
diff --git a/testing/pulseaudio/APKBUILD b/testing/pulseaudio/APKBUILD index b48d33b1f7..3e053e1dbb 100644 --- a/testing/pulseaudio/APKBUILD +++ b/testing/pulseaudio/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: pkgname=pulseaudio pkgver=6.0 -pkgrel=0 +pkgrel=1 pkgdesc="A featureful, general-purpose sound server" url="http://www.freedesktop.org/wiki/Software/PulseAudio" arch="all" @@ -11,9 +11,11 @@ depends="" depends_dev="libcap-dev json-c-dev libsndfile-dev" makedepends="$depends_dev m4 intltool libtool" install="" -subpackages="$pkgname-dev $pkgname-doc" +subpackages="$pkgname-dev $pkgname-doc $pkgname-libs" source="http://freedesktop.org/software/pulseaudio/releases/pulseaudio-$pkgver.tar.xz - 0001-padsp-Make-it-compile-on-musl.patch" + 0001-padsp-Make-it-compile-on-musl.patch + $pkgname.initd + $pkgname.confd" _builddir="$srcdir"/pulseaudio-$pkgver prepare() { @@ -43,12 +45,29 @@ build() { package() { cd "$_builddir" make -j1 DESTDIR="$pkgdir" install || return 1 + install -D -m755 "$srcdir"/$pkgname.initd \ + "$pkgdir"/etc/init.d/$pkgname || return 1 + install -D -m644 "$srcdir"/$pkgname.confd \ + "$pkgdir"/etc/conf.d/$pkgname || return 1 rm -f "$pkgdir"/usr/lib/*.la } +libs() { + pkgdesc="Pulseaudio libraries" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/pulseaudio \ + "$subpkgdir"/usr/lib/ || return 1 +} + md5sums="b691e83b7434c678dffacfa3a027750e pulseaudio-6.0.tar.xz -ac9d7f4c6cca22d349aaa7649d47a6e3 0001-padsp-Make-it-compile-on-musl.patch" +ac9d7f4c6cca22d349aaa7649d47a6e3 0001-padsp-Make-it-compile-on-musl.patch +305e790e7eced01d3de681379f8f3bc4 pulseaudio.initd +bf7487ba2c48fc8a56bca41c97a18934 pulseaudio.confd" sha256sums="b50640e0b80b1607600accfad2e45aabb79d379bf6354c9671efa2065477f6f6 pulseaudio-6.0.tar.xz -4c4af58f0f5f00230407f71e6ee3fa33b923feb12dfbc5ddad2075ab6a3ed234 0001-padsp-Make-it-compile-on-musl.patch" +4c4af58f0f5f00230407f71e6ee3fa33b923feb12dfbc5ddad2075ab6a3ed234 0001-padsp-Make-it-compile-on-musl.patch +c5e427c438e950353a7037d5784cdb91e6bcdd55def6635d8a6387230fbfca2a pulseaudio.initd +c03661e8cc902d27ff6b52f291207f2b008957571b942abdd92a873a52aae0dd pulseaudio.confd" sha512sums="4f2293b41c8278047a41be4609a6bc267766874001092a91e785b05d5224fd82810862402942dadbb54bed7f74689779c958ca512666dfe6755d29551583cc2d pulseaudio-6.0.tar.xz -b120d45ddbfe07b1fbbe821f6b6a515a7970a03577e3335e5961f61cbc2596e5d5924aff9c359dddd64f316e62518cd6641cdc113cb25703b1c81294e625e938 0001-padsp-Make-it-compile-on-musl.patch" +b120d45ddbfe07b1fbbe821f6b6a515a7970a03577e3335e5961f61cbc2596e5d5924aff9c359dddd64f316e62518cd6641cdc113cb25703b1c81294e625e938 0001-padsp-Make-it-compile-on-musl.patch +d20c1d118a51fa30b28a522ef0e607bd005c098291650aed45ed989d1377326484f1d3549ada38bc5a47f80f339109cdff6a9133359c12fae04b51060b2393e1 pulseaudio.initd +75b54581591519d63a3362b155c0f9b0501a60763ab394693a456c44d0216138cf3a40bdd0f7442028663bc045e9ffee286f8f8eaf2ee3bb17379b43615fee0e pulseaudio.confd" diff --git a/testing/pulseaudio/pulseaudio.confd b/testing/pulseaudio/pulseaudio.confd new file mode 100644 index 0000000000..1d31d342a0 --- /dev/null +++ b/testing/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/testing/pulseaudio/pulseaudio.initd b/testing/pulseaudio/pulseaudio.initd new file mode 100644 index 0000000000..21d25ba6e8 --- /dev/null +++ b/testing/pulseaudio/pulseaudio.initd @@ -0,0 +1,81 @@ +#!/sbin/runscript +# 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 $? +} |