[arch-commits] Commit in (6 files)

Jan Steffens heftig at archlinux.org
Fri Nov 19 13:54:08 UTC 2010


    Date: Friday, November 19, 2010 @ 08:54:08
  Author: heftig
Revision: 99919

Add ossp

Added:
  ossp/
  ossp/repos/
  ossp/trunk/
  ossp/trunk/PKGBUILD
  ossp/trunk/osspd.conf.d
  ossp/trunk/osspd.rc.d

--------------+
 PKGBUILD     |   43 +++++++++++++++++++++++++++++++++++++++++
 osspd.conf.d |   10 +++++++++
 osspd.rc.d   |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 112 insertions(+)

Added: ossp/trunk/PKGBUILD
===================================================================
--- ossp/trunk/PKGBUILD	                        (rev 0)
+++ ossp/trunk/PKGBUILD	2010-11-19 13:54:08 UTC (rev 99919)
@@ -0,0 +1,43 @@
+# $Id$
+# Maintainer: Jan "heftig" Steffens <jan.steffens at gmail.com>
+# Contributor: Jonathan Liu <net147 at gmail.com>
+
+pkgname=ossp
+pkgver=1.3.2
+pkgrel=10
+pkgdesc="Emulate OSS device using CUSE"
+arch=(i686 x86_64)
+url="http://sourceforge.net/projects/osspd"
+license=(GPL2)
+depends=('fuse>=2.8.0' 'kernel26>=2.6.35-2')
+makedepends=(pulseaudio alsa-lib)
+optdepends=("pulseaudio: PulseAudio backend"
+            "alsa-lib: ALSA backend")
+backup=(etc/conf.d/osspd)
+source=("http://downloads.sourceforge.net/project/osspd/${pkgname}-${pkgver}.tar.gz"
+        osspd.rc.d osspd.conf.d)
+
+build() {
+  cd "$srcdir/$pkgname-$pkgver"
+
+  make
+}
+
+package() {
+  cd "$srcdir/$pkgname-$pkgver"
+
+  make DESTDIR="$pkgdir" prefix=/usr UDEVDIR=/lib/udev/rules.d install
+
+  # Make compatible with udev ACLs
+  sed -e 's/GROUP="audio"/SUBSYSTEM=="cuse", MODE="0666"/' \
+      -i "$pkgdir/lib/udev/rules.d/98-osscuse.rules"
+
+  install -D -m644 README "$pkgdir/usr/share/doc/$pkgname/README"
+
+  install -D -m755 "$srcdir/osspd.rc.d" "$pkgdir/etc/rc.d/osspd"
+  install -D -m644 "$srcdir/osspd.conf.d" "$pkgdir/etc/conf.d/osspd"
+}
+
+md5sums=('ee2d8c894de2fa4eb3291804fbc7df45'
+         '69b745e0c499cd50019266a99082ce8b'
+         '5a5a3db1bb3c98d48d4794613cf12ef0')


Property changes on: ossp/trunk/PKGBUILD
___________________________________________________________________
Added: svn:keywords
   + Id

Added: ossp/trunk/osspd.conf.d
===================================================================
--- ossp/trunk/osspd.conf.d	                        (rev 0)
+++ ossp/trunk/osspd.conf.d	2010-11-19 13:54:08 UTC (rev 99919)
@@ -0,0 +1,10 @@
+# Define the audio backend to use here.
+# Leave undefined to autodetect.
+
+# Use Pulseaudio slave
+#DSP_SLAVE=/usr/sbin/ossp-padsp
+
+# Use ALSA slave
+#DSP_SLAVE=/usr/sbin/ossp-alsap
+
+# vim:set ft=sh:

Added: ossp/trunk/osspd.rc.d
===================================================================
--- ossp/trunk/osspd.rc.d	                        (rev 0)
+++ ossp/trunk/osspd.rc.d	2010-11-19 13:54:08 UTC (rev 99919)
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/osspd
+
+
+if [[ -z "$DSP_SLAVE" ]]; then
+  # Autodetect
+  if [[ -x /usr/bin/pulseaudio ]]; then
+    DSP_SLAVE="/usr/sbin/ossp-padsp"
+  else
+    DSP_SLAVE="/usr/sbin/ossp-alsap"
+  fi
+fi
+
+preclaim_oss=/sys/module/soundcore/parameters/preclaim_oss
+
+PID=`pidof -o %PPID /usr/sbin/osspd`
+case "$1" in
+  start)
+    stat_busy "Starting OSS userspace bridge"
+    if [ -z "$PID" ]; then 
+      if [[ -r $preclaim_oss && "$(cat $preclaim_oss)" -eq 1 ]]; then
+        echo "Must boot with soundcore.preclaim_oss=0"
+        stat_die
+      fi
+      modprobe cuse &>/dev/null
+      modprobe -r snd-pcm-oss snd-mixer-oss &>/dev/null
+      sleep 0.1
+      /usr/sbin/osspd --dsp-slave="$DSP_SLAVE"
+    fi
+    if [ -n "$PID" -o $? -gt 0 ]; then
+      stat_fail
+    else
+      add_daemon osspd
+      stat_done
+    fi
+    ;;
+  stop)
+    stat_busy "Stopping OSS userspace bridge"
+    [ -n "$PID" ] && kill $PID &>/dev/null
+    if [ $? -gt 0 ]; then
+      stat_fail
+    else
+      rm_daemon osspd
+      stat_done
+    fi
+    ;;
+  restart)
+    $0 stop
+    sleep 1
+    $0 start
+    ;;
+  *)
+    echo "usage: $0 {start|stop|restart}"  
+esac
+
+# vim:set ft=sh:


Property changes on: ossp/trunk/osspd.rc.d
___________________________________________________________________
Added: svn:executable
   + *




More information about the arch-commits mailing list