summaryrefslogtreecommitdiff
path: root/package/pulseaudio
diff options
context:
space:
mode:
Diffstat (limited to 'package/pulseaudio')
-rw-r--r--package/pulseaudio/Makefile15
-rw-r--r--package/pulseaudio/files/pulseaudio.init32
-rw-r--r--package/pulseaudio/files/pulseaudio.postinst7
3 files changed, 49 insertions, 5 deletions
diff --git a/package/pulseaudio/Makefile b/package/pulseaudio/Makefile
index 25e353bcd..88af55861 100644
--- a/package/pulseaudio/Makefile
+++ b/package/pulseaudio/Makefile
@@ -5,14 +5,15 @@ include $(TOPDIR)/rules.mk
PKG_NAME:= pulseaudio
PKG_VERSION:= 4.0
-PKG_RELEASE:= 1
+PKG_RELEASE:= 2
PKG_MD5SUM:= 591f211db2790a7e4d222f2dc6858db3
PKG_DESCR:= a sound system for POSIX OSes
PKG_SECTION:= multimedia
-PKG_DEPENDS:= libltdl json-c libsndfile libudev libspeex
-PKG_DEPENDS+= libflac libvorbis libogg libuuid libsndfile
+PKG_DEPENDS:= libltdl json-c libsndfile libudev libspeex libncurses
+PKG_DEPENDS+= libflac libvorbis libogg libuuid libsndfile libdbus
+PKG_DEPENDS+= libgcc libpthread librt alsa-lib
PKG_BUILDDEP:= libtool json-c libsndfile eudev speex libsndfile
-PKG_BUILDDEP+= flac libvorbis libogg util-linux
+PKG_BUILDDEP+= flac libvorbis libogg util-linux dbus ncurses alsa-lib
PKG_URL:= http://www.freedesktop.org/wiki/Software/PulseAudio/
PKG_SITES:= http://freedesktop.org/software/pulseaudio/releases/
PKG_OPTS:= dev
@@ -28,9 +29,10 @@ CONFIGURE_ARGS+= --disable-systemd \
--disable-neon-opt \
--disable-x11 \
--disable-openssl \
+ --enable-alsa \
--enable-dbus \
--enable-udev \
- --enable-speex \
+ --with-speex
pulseaudio-install:
$(INSTALL_DIR) $(IDIR_PULSEAUDIO)/etc/pulse
@@ -42,6 +44,9 @@ pulseaudio-install:
$(INSTALL_DIR) $(IDIR_PULSEAUDIO)/usr/lib
$(CP) $(WRKINST)/usr/lib/libpulse*.so* \
$(IDIR_PULSEAUDIO)/usr/lib
+ $(INSTALL_DIR) $(IDIR_PULSEAUDIO)/usr/lib/pulseaudio
+ $(CP) $(WRKINST)/usr/lib/pulseaudio/libpulse*.so* \
+ $(IDIR_PULSEAUDIO)/usr/lib/pulseaudio
$(INSTALL_DIR) $(IDIR_PULSEAUDIO)/usr/lib/pulse-$(PKG_VERSION)/modules
$(CP) $(WRKINST)/usr/lib/pulse-$(PKG_VERSION)/modules/*.so \
$(IDIR_PULSEAUDIO)/usr/lib/pulse-$(PKG_VERSION)/modules
diff --git a/package/pulseaudio/files/pulseaudio.init b/package/pulseaudio/files/pulseaudio.init
new file mode 100644
index 000000000..029174628
--- /dev/null
+++ b/package/pulseaudio/files/pulseaudio.init
@@ -0,0 +1,32 @@
+#!/bin/sh
+#PKG pulseaudio
+#INIT 60
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${pulseaudio:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ if [ ! -d /var/run/pulse ]; then
+ mkdir -p /var/run/pulse && chown pulse.pulse /var/run/pulse && chmod 750 /var/run/pulse
+ fi
+ if [ ! -d /var/lib/pulse ]; then
+ mkdir -p /var/lib/pulse && chown pulse.pulse /var/lib/pulse && chmod 750 /var/lib/pulse
+ fi
+ /usr/bin/pulseaudio $pulseaudio_flags
+ ;;
+stop)
+ kill $(pgrep -f /usr/bin/pulseaudio)
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "usage: $0 {start | stop | restart}"
+ exit 1
+esac
+exit $?
diff --git a/package/pulseaudio/files/pulseaudio.postinst b/package/pulseaudio/files/pulseaudio.postinst
new file mode 100644
index 000000000..3e5b348a9
--- /dev/null
+++ b/package/pulseaudio/files/pulseaudio.postinst
@@ -0,0 +1,7 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf pulseaudio pulseaudio NO
+gid=$(get_next_gid)
+add_user pulse $(get_next_uid) $gid /var/run/pulse
+add_group pulse $gid
+add_rcconf pulseaudio_flags pulseaudio_flags "--system --disallow-exit --disallow-module-loading --disable-shm --exit-idle-time=-1 --realtime=false"