]> git.pld-linux.org Git - packages/alsa-utils.git/commitdiff
new upstream release
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 18 Feb 1999 12:23:44 +0000 (12:23 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    alsa-utils.spec -> 1.2
    alsasound -> 1.1

alsa-utils.spec
alsasound [new file with mode: 0644]

index 12e742d5015fa511e5db91ffbb7ca26c721254f9..fcdc0d10a103203f789691feca34c6684a250544 100644 (file)
@@ -1,19 +1,20 @@
-Summary:       Advanced Linux Sound Architecture (ALSA) - Utils
-Summary(pl):   Advanced Linux Sound Architecture (ALSA) - Narzêdzia
-Name:          alsa-utils
-Version:       0.3.0-pre3
-Release:       1d
-Copyright:     GPL
-Group:         Applications/Sound
-Group(pl):     Aplikacje/D¼wiêk
-Vendor:                Jaroslav Kysela <perex@jcu.cz>
-Source:                ftp://alsa.jcu.cz/pub/utils/%{name}-%{version}.tar.gz 
-BuildRoot:     /tmp/buildroot-%{name}-%{version}
-URL:           http://alsa.jcu.cz
-Requires:      alsa-driver
-Requires:      alsa-lib
-Patch0:                %{name}-noroot.patch
-Patch1:                %{name}-opt.patch
+Summary:     Advanced Linux Sound Architecture (ALSA) - Utils
+Name:       alsa-utils
+Version:     0.3.0-pre3
+Release:     2d
+Copyright:   GPL
+Group:      Applications/Sound
+Group(pl):   Aplikacje/D¼wiêk
+Vendor:      Jaroslav Kysela <perex@jcu.cz>
+Source0:     ftp://alsa.jcu.cz/pub/utils/%{name}-%{version}.tar.gz 
+Source1:     alsasound
+BuildRoot:   /var/tmp/buildroot-%{name}-%{version}
+URL:        http://alsa.jcu.cz
+Requires:    alsa-driver
+Requires:    alsa-lib
+Patch0:             %{name}-noroot.patch
+Patch1:             %{name}-opt.patch
+Summary(pl): Advanced Linux Sound Architecture (ALSA) - Narzêdzia
 
 %description
 Advanced Linux Sound Architecture (ALSA) - Utils
@@ -25,7 +26,7 @@ alsamixer, amixer, aplay, arecord
 
 %prep
 %setup -q 
-%patch0 -p1
+%patch  -p1
 %patch1 -p1
 
 %build
@@ -35,32 +36,47 @@ OPT="$RPM_OPT_FLAGS" make
 %install
 rm -rf $RPM_BUILD_ROOT
 
-install -d $RPM_BUILD_ROOT/usr/{bin,man/man1}
+install -d $RPM_BUILD_ROOT/{usr/{bin,man/man1},etc/rc.d/init.d}
 make prefix=$RPM_BUILD_ROOT/usr install
-
-rm -f $RPM_BUILD_ROOT/usr/man/man1/aplay.1
-
+rm $RPM_BUILD_ROOT/usr/man/man1/aplay.1
 echo ".so arecord.1" > $RPM_BUILD_ROOT/usr/man/man1/aplay.1
-
 strip $RPM_BUILD_ROOT/usr/{s,}bin/*
 
-bzip2 -9  README ChangeLog amixer/README.first 
-gzip -9fn $RPM_BUILD_ROOT/usr/man/man1/*
+install %SOURCE1 $RPM_BUILD_ROOT/etc/rc.d/init.d/
+touch $RPM_BUILD_ROOT/etc/asound.conf
+
+gzip -9nf README ChangeLog amixer/README.first $RPM_BUILD_ROOT/usr/man/man1/*
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+/sbin/chkconfig --add alsasound
+
+%preun
+if [ "$1" = 0 ] ; then
+    /sbin/chkconfig --del alsasound
+fi
+    
 %files
 %defattr(644,root,root,755)
-%doc {README,ChangeLog}.bz2 amixer/README.first.bz2
+%doc README.gz ChangeLog.gz amixer/README.first.gz
 
 %attr(755,root,root) /usr/bin/*
 %attr(755,root,root) /usr/sbin/*
-%attr(644,root, man) /usr/man/man1/*
+%attr(644,root,man ) /usr/man/man1/*
+%attr(750,root,root) /etc/rc.d/init.d/*
+%attr(600,root,root) %config(noreplace) /etc/asound.conf
 
 %changelog
+* Sat Feb 13 1999 Arkadiusz Mi¶kiewicz <misiek@misiek.eu.org>
+[0.3.0-pre3-1d]
+- /etc/rc.d/init.d/alsasound is now part of this package
+- gzipping instead bzip2ing
+- 755 instead 711 on binaries
+
 * Wed Jan 27 1999 Arkadiusz Mi¶kiewicz <misiek@misiek.eu.org>
-  [0.3.0-pre3-1d]
+[0.3.0-pre3-1d]
 - new upstream release
 
 * Tue Jan 05 1999 Arkadiusz Mi¶kiewicz <misiek@misiek.eu.org>
diff --git a/alsasound b/alsasound
new file mode 100644 (file)
index 0000000..7a4cec0
--- /dev/null
+++ b/alsasound
@@ -0,0 +1,162 @@
+#!/bin/bash
+#
+# alsasound     This shell script takes care of starting and stopping
+#               ALSA sound driver.
+#
+# This script requires /usr/sbin/alsactl program from alsa-utils package.
+#
+# Copyright (c) by Jaroslav Kysela <perex@jcu.cz> 
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#
+# For RedHat 5.0+:
+# chkconfig: 2345 87 14
+# description: ALSA driver
+#
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+alsactl=/usr/sbin/alsactl
+
+if [ -r /etc/modules.conf ]; then
+MODULES_CONF=/etc/modules.conf
+else
+MODULES_CONF=/etc/conf.modules
+fi
+
+function start() {
+  #
+  # insert all sound modules
+  #
+  cat $MODULES_CONF | grep -v "off" | \
+    grep -E "^alias.+snd-card-[[:digit:]]" | \
+    awk '{print $3}' | \
+    while read line; do \
+      show "Starting sound driver: $line " ; \
+      /sbin/modprobe $line; \
+      ok; \
+    done
+  #
+  # restore driver settings
+  #
+  if [ -x $alsactl ]; then
+    $alsactl restore
+  else
+    show "ERROR: alsactl not found"; fail
+  fi
+}
+
+function detect_stop() {
+  #
+  # remove all sound modules
+  #
+  /sbin/lsmod | grep -E "^snd" | while read line; do \
+     /sbin/rmmod `echo $line | cut -d ' ' -f 1`; \
+  done
+}
+
+function stop() {
+  #
+  # store driver settings
+  #
+  if [ -x $alsactl ]; then
+    $alsactl store
+  else
+    show "!!!alsactl not found!!! "; fail
+  fi
+  #
+  # remove all sound modules
+  #
+  detect_stop
+}
+
+function detect_start() {
+  #
+  # run only detect module
+  #
+  /sbin/modprobe snd-detect
+}
+
+# See how we were called.
+case "$1" in
+  start)
+        # Start driver.
+       if [ ! -d /proc/asound ]; then
+         start
+         if [ -d /proc/asound ] && [ -d /var/lock/subsys ]; then
+           touch /var/lock/subsys/alsasound
+         fi
+       else
+         if [ -f /proc/asound/detect ]; then
+           show "Shutting down sound detect module: "
+           detect_stop
+           ok
+           start
+           if [ -d /proc/asound ] && [ -d /var/lock/subsys ]; then
+             touch /var/lock/subsys/alsasound
+           fi
+          else
+           show "ALSA driver is already running "; fail
+         fi
+       fi
+        ;;
+  stop)
+        # Stop daemons.
+       if [ -d /proc/asound ]; then
+          show "Shutting down sound driver: "
+         if [ -f /proc/asound/detect ]; then
+           detect_stop
+         else
+           stop
+         fi
+         if [ -d /var/lock/subsys ]; then
+           rm -f /var/lock/subsys/alsasound
+         fi
+         ok
+       else
+         show "ALSA driver isn't running "; fail
+       fi
+        ;;
+  restart)
+       $0 stop
+       $0 start
+       ;;
+  detect)
+       # Start driver only in detect mode.
+       if [ -d /proc/asound ]; then
+         if [ -f /proc/asound/detect ]; then
+           show "ALSA is already running detection mode "; fail
+           exit 0
+          else
+           show "Shutting down sound driver: "
+           stop
+           ok
+         fi
+       fi
+       show "Starting sound detect module: "
+       detect_start
+       ok
+       if [ -d /var/lock/subsys ]; then
+         touch /var/lock/subsys/alsasound
+       fi
+       ;;
+  *)
+        echo "Usage: $0 {start|stop|restart|detect}"
+        exit 1
+esac
+
+exit 0
This page took 0.461183 seconds and 4 git commands to generate.