packages: alsa-utils/alsa-utils.spec, alsa-utils/alsasound.init, alsa-utils...

patrys patrys at pld-linux.org
Thu Jun 11 16:55:19 CEST 2009


Author: patrys                       Date: Thu Jun 11 14:55:19 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- make sound cards work by default
- move necessary utils from /prefix to /
- rel 4

---- Files affected:
packages/alsa-utils:
   alsa-utils.spec (1.159 -> 1.160) , alsasound.init (1.20 -> 1.21) , alsa-udev.rules (NONE -> 1.1)  (NEW), alsactl.conf (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/alsa-utils/alsa-utils.spec
diff -u packages/alsa-utils/alsa-utils.spec:1.159 packages/alsa-utils/alsa-utils.spec:1.160
--- packages/alsa-utils/alsa-utils.spec:1.159	Sun May 24 18:58:44 2009
+++ packages/alsa-utils/alsa-utils.spec	Thu Jun 11 16:55:14 2009
@@ -7,7 +7,7 @@
 Summary(uk.UTF-8):	Утиліти командного рядка для ALSA project
 Name:		alsa-utils
 Version:	1.0.20
-Release:	3
+Release:	4
 # some apps GPL v2, some GPL v2+
 License:	GPL v2
 Group:		Applications/Sound
@@ -15,6 +15,8 @@
 # Source0-md5:	6837e673ef19da96d8bd2f9e18cd9574
 Source1:	alsasound.init
 Source2:	alsa-oss-pcm
+Source3:	alsa-udev.rules
+Source4:	alsactl.conf
 URL:		http://www.alsa-project.org/
 Patch0:		%{name}-fast_sampling.patch
 Patch1:		%{name}-modprobe.patch
@@ -33,6 +35,7 @@
 Requires:	which
 Suggests:	gpm
 Obsoletes:	alsaconf
+Obsoletes:	alsa-udev
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -105,7 +108,9 @@
 %{__automake}
 CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
 CXXFLAGS="%{rpmcxxflags} -fno-rtti -fno-exceptions"
-%configure
+# we need alsactl for udev as early as possible
+%configure \
+	--sbindir=/sbin
 %{__make}
 
 %install
@@ -116,6 +121,15 @@
 
 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/alsasound
 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/alsa-oss-pcm
+install -D %{SOURCE3} $RPM_BUILD_ROOT/etc/udev/rules.d/90-alsa.rules
+install -D %{SOURCE4} $RPM_BUILD_ROOT/etc/alsa/alsactl.conf
+
+install -d $RPM_BUILD_ROOT/lib/alsa
+mv $RPM_BUILD_ROOT%{_datadir}/alsa/init $RPM_BUILD_ROOT/lib/alsa
+
+ln -s /lib/alsa/init $RPM_BUILD_ROOT%{_datadir}/alsa/init
+install -d $RPM_BUILD_ROOT%{_sbindir}
+ln -s /sbin/alsactl $RPM_BUILD_ROOT%{_sbindir}/alsactl
 
 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/arecord.1
 echo ".so aplay.1" > $RPM_BUILD_ROOT%{_mandir}/man1/arecord.1
@@ -138,8 +152,13 @@
 %files -f alsa-utils.lang
 %defattr(644,root,root,755)
 %doc README ChangeLog
+%attr(755,root,root) /sbin/*
 %attr(755,root,root) %{_bindir}/*
 %attr(755,root,root) %{_sbindir}/*
+%{_sysconfdir}/alsa/alsactl.conf
+%{_sysconfdir}/udev/rules.d/90-alsa.rules
+%dir /lib/alsa
+/lib/alsa/init
 %{_datadir}/alsa/init
 %{_datadir}/alsa/speaker-test
 %{_datadir}/sounds/alsa
@@ -171,6 +190,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.160  2009/06/11 14:55:14  patrys
+- make sound cards work by default
+- move necessary utils from /prefix to /
+- rel 4
+
 Revision 1.159  2009/05/24 16:58:44  patrys
 - rel 3
 

================================================================
Index: packages/alsa-utils/alsasound.init
diff -u packages/alsa-utils/alsasound.init:1.20 packages/alsa-utils/alsasound.init:1.21
--- packages/alsa-utils/alsasound.init:1.20	Wed Nov  5 20:07:43 2008
+++ packages/alsa-utils/alsasound.init	Thu Jun 11 16:55:14 2009
@@ -3,8 +3,6 @@
 # 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 at jcu.cz>
 #
 #  This program is free software; you can redistribute it and/or modify
@@ -49,22 +47,6 @@
       /sbin/modprobe $line
       ok
     done
-
-  # restore driver settings
-  #
-  if [ -x /usr/sbin/alsactl ]; then
-    if [ -f /etc/asound.state ]; then
-      if [ "$(kernelver)" -lt "002006012" ]; then
-	for i in 1 2 3 4; do
-	  [ -a /dev/snd/controlC0 ] && break
-	  sleep 1
-	done
-      fi
-      /usr/sbin/alsactl restore
-    fi
-  else
-    show "ERROR: alsactl not found"; fail
-  fi
 }
 
 detect_stop()
@@ -79,14 +61,6 @@
 
 driver_stop()
 {
-  #
-  # store driver settings
-  #
-  if [ -x /usr/sbin/alsactl ]; then
-    /usr/sbin/alsactl store
-  else
-    show '!!!alsactl not found!!!'; fail
-  fi
   #
   # remove all sound modules
   #

================================================================
Index: packages/alsa-utils/alsa-udev.rules
diff -u /dev/null packages/alsa-utils/alsa-udev.rules:1.1
--- /dev/null	Thu Jun 11 16:55:20 2009
+++ packages/alsa-utils/alsa-udev.rules	Thu Jun 11 16:55:14 2009
@@ -0,0 +1,4 @@
+ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", \
+  RUN+="/sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/lib/alsa/init/00main restore /dev/$name"
+ACTION=="remove", SUBSYSTEM=="sound", KERNEL=="controlC*", \
+  RUN+="/sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf store /dev/$name"

================================================================
Index: packages/alsa-utils/alsactl.conf
diff -u /dev/null packages/alsa-utils/alsactl.conf:1.1
--- /dev/null	Thu Jun 11 16:55:20 2009
+++ packages/alsa-utils/alsactl.conf	Thu Jun 11 16:55:14 2009
@@ -0,0 +1,14 @@
+#
+# ALSA library configuration file for alsactl tool
+# (/usr/share/alsa tree is not necessary for alsactl)
+#
+
+ctl.hw {
+	@args [ CARD ]
+	@args.CARD {
+		type string
+		default "0"
+	}
+	type hw
+	card $CARD
+}
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/alsa-utils/alsa-utils.spec?r1=1.159&r2=1.160&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/alsa-utils/alsasound.init?r1=1.20&r2=1.21&f=u



More information about the pld-cvs-commit mailing list