alsa-utils: more cleanups for 1.0.18rc3

This commit is contained in:
perex 2008-09-11 11:54:09 +00:00
parent 1e0bef8f50
commit 745b2e248f
5 changed files with 55 additions and 19 deletions

View File

@ -1,18 +1,16 @@
diff -ruNp alsa-utils-1.0.17.orig/Makefile.am alsa-utils-1.0.17/Makefile.am --- alsa-utils-1.0.18rc3/Makefile.am.orig 2008-09-09 19:50:28.000000000 +0200
--- alsa-utils-1.0.17.orig/Makefile.am 2008-07-14 11:16:02.000000000 +0200 +++ alsa-utils-1.0.18rc3/Makefile.am 2008-09-11 11:18:01.000000000 +0200
+++ alsa-utils-1.0.17/Makefile.am 2008-07-21 14:10:06.000000000 +0200
@@ -4,7 +4,7 @@ ALSAMIXER_DIR=alsamixer @@ -4,7 +4,7 @@ ALSAMIXER_DIR=alsamixer
else else
ALSAMIXER_DIR= ALSAMIXER_DIR=
endif endif
-SUBDIRS= include alsactl alsaconf $(ALSAMIXER_DIR) amidi amixer aplay iecset seq speaker-test utils m4 po -SUBDIRS= include alsactl alsaconf $(ALSAMIXER_DIR) amidi amixer aplay iecset seq speaker-test utils m4 po
+SUBDIRS= include alsactl $(ALSAMIXER_DIR) amidi amixer aplay iecset seq speaker-test utils m4 po +SUBDIRS= include alsactl $(ALSAMIXER_DIR) amidi amixer aplay iecset seq speaker-test utils m4 po
EXTRA_DIST= config.rpath config.rpath mkinstalldirs ChangeLog INSTALL TODO README configure gitcompile depcomp EXTRA_DIST= config.rpath TODO gitcompile
AUTOMAKE_OPTIONS=foreign AUTOMAKE_OPTIONS=foreign
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
diff -ruNp alsa-utils-1.0.17.orig/Makefile.in alsa-utils-1.0.17/Makefile.in --- alsa-utils-1.0.18rc3/Makefile.in.orig 2008-09-11 11:17:52.000000000 +0200
--- alsa-utils-1.0.17.orig/Makefile.in 2008-07-14 11:16:06.000000000 +0200 +++ alsa-utils-1.0.18rc3/Makefile.in 2008-09-11 11:17:52.000000000 +0200
+++ alsa-utils-1.0.17/Makefile.in 2008-07-21 14:10:35.000000000 +0200
@@ -65,7 +65,7 @@ RECURSIVE_TARGETS = all-recursive check- @@ -65,7 +65,7 @@ RECURSIVE_TARGETS = all-recursive check-
uninstall-recursive uninstall-recursive
ETAGS = etags ETAGS = etags
@ -28,6 +26,6 @@ diff -ruNp alsa-utils-1.0.17.orig/Makefile.in alsa-utils-1.0.17/Makefile.in
@ALSAMIXER_TRUE@ALSAMIXER_DIR = alsamixer @ALSAMIXER_TRUE@ALSAMIXER_DIR = alsamixer
-SUBDIRS = include alsactl alsaconf $(ALSAMIXER_DIR) amidi amixer aplay iecset seq speaker-test utils m4 po -SUBDIRS = include alsactl alsaconf $(ALSAMIXER_DIR) amidi amixer aplay iecset seq speaker-test utils m4 po
+SUBDIRS = include alsactl $(ALSAMIXER_DIR) amidi amixer aplay iecset seq speaker-test utils m4 po +SUBDIRS = include alsactl $(ALSAMIXER_DIR) amidi amixer aplay iecset seq speaker-test utils m4 po
EXTRA_DIST = config.rpath config.rpath mkinstalldirs ChangeLog INSTALL TODO README configure gitcompile depcomp EXTRA_DIST = config.rpath TODO gitcompile
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4

View File

@ -13,11 +13,13 @@ Source4: alsaunmute
Source6: alsa-info.sh Source6: alsa-info.sh
Source10: alsa.rules Source10: alsa.rules
Source11: alsactl.conf Source11: alsactl.conf
Patch0: alsa-utils-1.0.17-alsaconf.patch Patch0: alsa-utils-1.0.18-alsaconf.patch
Patch1: alsactl-fix-card-parsing.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: alsa-lib-devel >= %{version} BuildRequires: alsa-lib-devel >= %{version}
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
BuildRequires: gettext-devel BuildRequires: gettext-devel
BuildRequires: xmlto
Conflicts: udev < 062 Conflicts: udev < 062
%description %description
@ -27,11 +29,12 @@ Architecture (ALSA).
%prep %prep
%setup -q -n %{name}-%{version}%{?prever} %setup -q -n %{name}-%{version}%{?prever}
%patch0 -p1 %patch0 -p1
%patch1 -p1
%build %build
%configure CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" --sbindir=/sbin %configure CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" --sbindir=/sbin
%{__make} %{?_smp_mflags} %{__make} %{?_smp_mflags}
%{__cp} %{SOURCE5} . %{__cp} %{SOURCE4} .
%install %install
%{__rm} -rf $RPM_BUILD_ROOT %{__rm} -rf $RPM_BUILD_ROOT
@ -50,13 +53,20 @@ install -p -m 755 alsaunmute %{buildroot}/bin/
mkdir -p $RPM_BUILD_ROOT/%{_sbindir} mkdir -p $RPM_BUILD_ROOT/%{_sbindir}
ln -s ../../sbin/alsactl $RPM_BUILD_ROOT/%{_sbindir}/alsactl ln -s ../../sbin/alsactl $RPM_BUILD_ROOT/%{_sbindir}/alsactl
# Move /usr/share/alsa/init to /lib/alsa/init
mkdir -p -m 755 %{buildroot}/%{_lib}/alsa
mv %{buildroot}%{_datadir}/alsa/init %{buildroot}/%{_lib}/alsa
# Link /lib/alsa/init to /usr/share/alsa/init back
ln -s ../../../lib/alsa/init %{buildroot}%{_datadir}/alsa/init
# Create a place for global configuration # Create a place for global configuration
mkdir -p -m 755 $RPM_BUILD_ROOT/etc/alsa mkdir -p -m 755 %{buildroot}/etc/alsa
install -p -m 644 alsactl.conf %{buildroot}/etc/alsa install -p -m 644 %{SOURCE11} %{buildroot}/etc/alsa
touch $RPM_BUILD_ROOT/etc/asound.state touch %{buildroot}/etc/asound.state
# Install alsa-info.sh script # Install alsa-info.sh script
install -p -m 755 %{SOURCE6} $RPM_BUILD_ROOT/usr/bin/alsa-info install -p -m 755 %{SOURCE6} %{buildroot}/usr/bin/alsa-info
%clean %clean
%{__rm} -rf $RPM_BUILD_ROOT %{__rm} -rf $RPM_BUILD_ROOT
@ -68,6 +78,7 @@ install -p -m 755 %{SOURCE6} $RPM_BUILD_ROOT/usr/bin/alsa-info
%config /etc/alsa/* %config /etc/alsa/*
/bin/* /bin/*
/sbin/* /sbin/*
/%{_lib}/alsa/init/*
%{_bindir}/* %{_bindir}/*
%{_sbindir}/* %{_sbindir}/*
%{_datadir}/alsa/ %{_datadir}/alsa/

View File

@ -1,4 +1,4 @@
ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", \ ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", \
ENV{ALSA_CONFIG_PATH}="/etc/alsa/alsactl.conf", RUN+="/sbin/alsactl restore $name" RUN+="/sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/lib/alsa/init/00main restore $name"
ACTION=="remove", SUBSYSTEM=="sound", KERNEL=="controlC*", \ ACTION=="remove", SUBSYSTEM=="sound", KERNEL=="controlC*", \
ENV{ALSA_CONFIG_PATH}="/etc/alsa/alsactl.conf", RUN+="/sbin/alsactl store $name" RUN+="/sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf store $name"

View File

@ -0,0 +1,26 @@
From 0a8e8d581e5df6f1b13ea009fcdd77c6afcbdc43 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Thu, 11 Sep 2008 13:39:42 +0200
Subject: [PATCH] alsactl: Fix oops (when parsing card argument)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
alsactl/alsactl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/alsactl/alsactl.c b/alsactl/alsactl.c
index 6728fbc..57957bf 100644
--- a/alsactl/alsactl.c
+++ b/alsactl/alsactl.c
@@ -150,7 +150,7 @@ int main(int argc, char *argv[])
}
cardname = argc - optind > 1 ? argv[optind + 1] : NULL;
- for (tmp = devfiles; cardname != NULL && tmp != NULL; tmp++) {
+ for (tmp = devfiles; cardname != NULL && *tmp != NULL; tmp++) {
int len = strlen(*tmp);
if (!strncmp(cardname, *tmp, len)) {
long l = strtol(cardname + len, NULL, 0);
--
1.6.0.GIT

View File

@ -1,5 +1,6 @@
#!/bin/sh #!/bin/sh
export ALSA_CONFIG_PATH="/etc/alsa/alsactl.conf" exec /sbin/alsactl \
exec /sbin/alsactl init -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf \
--initfile=/lib/alsa/init/00main \
init