aboutsummaryrefslogtreecommitdiff
path: root/audio/oss
diff options
context:
space:
mode:
authorDugan Chen <max@mr.gy>2014-03-12 07:16:23 +0700
committerErik Hanson <erik@slackbuilds.org>2014-03-12 12:42:51 -0500
commit564e1f2a5bd9245600ccf321960bc85607c88555 (patch)
tree6ce761e2e48734dacb0e1820cd47d961fcafa8d0 /audio/oss
parenta8945a06d5f8e91d7abbbe1a71154bf727e986b2 (diff)
audio/oss: Moved from System category.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio/oss')
-rw-r--r--audio/oss/README10
-rw-r--r--audio/oss/README.SLACKWARE24
-rw-r--r--audio/oss/doinst.sh26
-rw-r--r--audio/oss/oss.SlackBuild103
-rw-r--r--audio/oss/oss.info10
-rw-r--r--audio/oss/ossxmix.desktop8
-rw-r--r--audio/oss/rc.oss39
-rw-r--r--audio/oss/slack-desc19
8 files changed, 239 insertions, 0 deletions
diff --git a/audio/oss/README b/audio/oss/README
new file mode 100644
index 000000000000..adc7dac3154e
--- /dev/null
+++ b/audio/oss/README
@@ -0,0 +1,10 @@
+The Open Sound System is a set of sound drivers that serve as an alternative
+to the usual ALSA architecture.
+
+Among the benefits are:
+* volume levels being settable for each application individually
+* better latency than ALSA in most cases
+
+If your WM/DE supports tray icons, you will have one for the OSS mixer.
+
+See README.SLACKWARE for post-installation instructions and setup information.
diff --git a/audio/oss/README.SLACKWARE b/audio/oss/README.SLACKWARE
new file mode 100644
index 000000000000..25c8e37d49fb
--- /dev/null
+++ b/audio/oss/README.SLACKWARE
@@ -0,0 +1,24 @@
+README.SLACKWARE for oss
+
+After installing the package, do the following:
+
+1. Blacklist the alsa modules for your sound card.
+ The output of "lsmod | grep snd" should give you a list of which modules
+ will need to be blacklisted.
+
+2. Make /etc/rc.d/rc.alsa non-executable: chmod 0644 /etc/rc.d/rc.alsa
+
+3. Make /etc/rc.d/rc.oss executable: chmod 0755 /etc/rc.d/rc.oss
+
+4. Add this snippet to /etc/rc.d/rc.local:
+
+ if [ -x /etc/rc.d/rc.oss ]; then
+ /etc/rc.d/rc.oss start
+ fi
+
+5. Reboot.
+
+6. Test sound to ensure that it works - use "osstest" for this.
+
+7. Configure applications to use OSS instead of ALSA; typically, this will
+ involve setting the "Sound Command" or some such to use "ossplay"
diff --git a/audio/oss/doinst.sh b/audio/oss/doinst.sh
new file mode 100644
index 000000000000..ff13b1c6fa40
--- /dev/null
+++ b/audio/oss/doinst.sh
@@ -0,0 +1,26 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# Keep same perms on rc.oss.new:
+if [ -e etc/rc.d/rc.oss ]; then
+ cp -a etc/rc.d/rc.oss etc/rc.d/rc.oss.new.incoming
+ cat etc/rc.d/rc.oss.new > etc/rc.d/rc.oss.new.incoming
+ mv etc/rc.d/rc.oss.new.incoming etc/rc.d/rc.oss.new
+fi
+
+config etc/oss.conf.new
+config etc/rc.d/rc.oss.new
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
diff --git a/audio/oss/oss.SlackBuild b/audio/oss/oss.SlackBuild
new file mode 100644
index 000000000000..5ef14a479deb
--- /dev/null
+++ b/audio/oss/oss.SlackBuild
@@ -0,0 +1,103 @@
+#!/bin/sh
+
+# Slackware build script for OSS 4.
+
+# Written by Dugan Chen (thedoogster [at] gmail [dot] com).
+
+PRGNAM=oss
+VERSION=${VERSION:-4.2.2008}
+SRCZIP="ender.zip"
+SRCDIR="oss-v4.2-build2008-ender"
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+MAJOR=$(printf $VERSION | cut -d. -f-2)
+MINOR=$(printf $VERSION | cut -d. -f3)
+
+SRCVERSION=v${MAJOR}-build${MINOR}-src-gpl
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2" # yes, -fPIC is left out on purpose here
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$SRCVERSION
+unzip -x $CWD/$SRCZIP
+cd $SRCDIR
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+if [ $ARCH = "x86_64" ]; then
+ sed -i 's,OSSLIBDIR=\"/usr/lib/oss\",OSSLIBDIR=\"/usr/lib64/oss\",g' configure
+fi
+
+mkdir build && cd build
+../configure
+CFLAGS="$SLKCFLAGS" make build
+cp -a prototype/* $PKG
+
+chmod -R a+r $PKG
+find $PKG -type d -exec chmod a+x '{}' \;
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Don't clobber the config file
+mv $PKG/etc/oss.conf $PKG/etc/oss.conf.new
+
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.oss > $PKG/etc/rc.d/rc.oss.new
+
+mkdir -p $PKG/usr/share/applications
+cat $CWD/ossxmix.desktop > $PKG/usr/share/applications/ossxmix.desktop
+
+mkdir -p $PKG/etc/xdg/autostart
+( cd $PKG/etc/xdg/autostart
+ ln -sf /usr/share/applications/ossxmix.desktop .
+)
+
+# Fix location of manual pages
+mv $PKG/usr/share/man $PKG/usr
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING Changelog RELNOTES.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/audio/oss/oss.info b/audio/oss/oss.info
new file mode 100644
index 000000000000..7be743224cdb
--- /dev/null
+++ b/audio/oss/oss.info
@@ -0,0 +1,10 @@
+PRGNAM="oss"
+VERSION="4.2.2008"
+HOMEPAGE="http://www.opensound.com"
+DOWNLOAD="https://github.com/etch-squeeze/oss-v4.2-build2008/archive/ender.zip"
+MD5SUM="2b44983fa90dc096ce349472ee3e2e5e"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Dugan Chen"
+EMAIL="thedoogster [at] gmail [dot] com"
diff --git a/audio/oss/ossxmix.desktop b/audio/oss/ossxmix.desktop
new file mode 100644
index 000000000000..af6185bed392
--- /dev/null
+++ b/audio/oss/ossxmix.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Open Sound System Mixer
+GenericName=Audio Mixer
+Exec=ossxmix -b
+Icon=audio-card
+Categories=GTK;AudioVideo;Player;
+Terminal=false
+Type=Application
diff --git a/audio/oss/rc.oss b/audio/oss/rc.oss
new file mode 100644
index 000000000000..a8084594fa30
--- /dev/null
+++ b/audio/oss/rc.oss
@@ -0,0 +1,39 @@
+#!/bin/sh
+# Start/stop/restart OSS:
+
+# Credit to Tsomi, on the 4Front Technologies forum:
+# http://www.opensound.com/board2006/viewtopic.php?p=8174
+
+oss_start() {
+ echo "Starting OSS..."
+ if [ -x /usr/sbin/soundon ]; then
+ /usr/sbin/soundon
+ else
+ echo "No /usr/sbin/soundon script found."
+ exit 1
+ fi
+}
+
+oss_stop() {
+ echo "Stopping OSS..."
+ /usr/sbin/soundoff
+}
+
+# See how we were called.
+case "$1" in
+ start)
+ oss_start
+ ;;
+ stop)
+ oss_stop
+ ;;
+ restart)
+ oss_stop
+ sleep 1
+ oss_start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ ;;
+esac
+
diff --git a/audio/oss/slack-desc b/audio/oss/slack-desc
new file mode 100644
index 000000000000..43e47c734573
--- /dev/null
+++ b/audio/oss/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+oss: oss (The Open Sound System)
+oss:
+oss: The Open Sound System (OSS) is a standard interface for making and
+oss: capturing sound in Unix operating systems. The goal of OSS is to
+oss: allow one to write a sound-based application program that works with
+oss: any sound controller hardware, even though the hardware interface
+oss: varies greatly from one type to another. OSS is free software,
+oss: distributed (here) under the GPL license.
+oss:
+oss: Learn more at: http://www.opensound.com/
+oss: