mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-09-13 01:31:19 +02:00
testing/pulseaudio: add init
This commit is contained in:
parent
60daac1d47
commit
eb8c82993a
@ -2,7 +2,7 @@
|
||||
# Maintainer:
|
||||
pkgname=pulseaudio
|
||||
pkgver=4.0
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
pkgdesc="A featureful, general-purpose sound server"
|
||||
url="http://www.freedesktop.org/wiki/Software/PulseAudio"
|
||||
arch="all"
|
||||
@ -14,7 +14,9 @@ depends_dev="glib-dev json-c-dev libsndfile-dev tdb-dev udev-dev dbus-dev speex-
|
||||
makedepends="$depends_dev autoconf automake libtool intltool"
|
||||
install=""
|
||||
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-libs"
|
||||
source="http://freedesktop.org/software/pulseaudio/releases/pulseaudio-$pkgver.tar.xz"
|
||||
source="http://freedesktop.org/software/pulseaudio/releases/pulseaudio-$pkgver.tar.xz
|
||||
$pkgname.initd
|
||||
$pkgname.confd"
|
||||
|
||||
_builddir="$srcdir"/pulseaudio-$pkgver
|
||||
prepare() {
|
||||
@ -46,10 +48,15 @@ package() {
|
||||
make DESTDIR="$pkgdir" install || return 1
|
||||
rm -f "$pkgdir"/usr/lib/*.la \
|
||||
"$pkgdir"/usr/lib/*/*.la
|
||||
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
|
||||
}
|
||||
|
||||
libs() {
|
||||
pkgdesc="Pulseaudio libraries"
|
||||
depends=""
|
||||
cd "$_builddir"
|
||||
mkdir -p "$subpkgdir"/etc/pulse \
|
||||
"$subpkgdir"/usr/bin \
|
||||
@ -72,6 +79,12 @@ libs() {
|
||||
"$subpkgdir"/usr/lib/pulseaudio || return 1
|
||||
}
|
||||
|
||||
md5sums="591f211db2790a7e4d222f2dc6858db3 pulseaudio-4.0.tar.xz"
|
||||
sha256sums="35ceb36bb1822fe54f0b5e4863b4f486769fdfb8ff2111f01fd8778928f9cdae pulseaudio-4.0.tar.xz"
|
||||
sha512sums="7cfb57b15943ec5239f23b90637ab7ab421ac57cf05312030bb348ee7d72a70343716b9bf79035b2426e820984cf8179285548b8acf0b7232defcd8b9ad32e83 pulseaudio-4.0.tar.xz"
|
||||
md5sums="591f211db2790a7e4d222f2dc6858db3 pulseaudio-4.0.tar.xz
|
||||
fd33954332955e8ef6a8f9f1f5c58e80 pulseaudio.initd
|
||||
bf7487ba2c48fc8a56bca41c97a18934 pulseaudio.confd"
|
||||
sha256sums="35ceb36bb1822fe54f0b5e4863b4f486769fdfb8ff2111f01fd8778928f9cdae pulseaudio-4.0.tar.xz
|
||||
60e4571a8af0437bd99cfd858fde1e6223544a60e591febf25e55e4a2918ff59 pulseaudio.initd
|
||||
c03661e8cc902d27ff6b52f291207f2b008957571b942abdd92a873a52aae0dd pulseaudio.confd"
|
||||
sha512sums="7cfb57b15943ec5239f23b90637ab7ab421ac57cf05312030bb348ee7d72a70343716b9bf79035b2426e820984cf8179285548b8acf0b7232defcd8b9ad32e83 pulseaudio-4.0.tar.xz
|
||||
c510ddc71509435946a4f5a29ee2deb124fddec1a078433651bee99fd71424a0673c6b67015c2b737878e0e6e1da0b0ee4935e419a00cbfe74d6f8c8dc91f243 pulseaudio.initd
|
||||
75b54581591519d63a3362b155c0f9b0501a60763ab394693a456c44d0216138cf3a40bdd0f7442028663bc045e9ffee286f8f8eaf2ee3bb17379b43615fee0e pulseaudio.confd"
|
||||
|
7
testing/pulseaudio/pulseaudio.confd
Normal file
7
testing/pulseaudio/pulseaudio.confd
Normal file
@ -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"
|
81
testing/pulseaudio/pulseaudio.initd
Normal file
81
testing/pulseaudio/pulseaudio.initd
Normal file
@ -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} alsasound"
|
||||
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.pulseaudio.org/wiki/WhatIsWrongWithSystemMode"
|
||||
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 $?
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user