Package: alsa-utils / 1.0.28-1

alsactl_home.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Author: Jordi Mallach <jordi@debian.org>
Description: add new configure switch to set alsactl's homedir.
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=712980

Index: alsa-utils-1.0.28/configure.ac
===================================================================
--- alsa-utils-1.0.28.orig/configure.ac
+++ alsa-utils-1.0.28/configure.ac
@@ -344,6 +344,12 @@ AC_ARG_WITH([alsactl-pidfile-dir],
         [ALSACTL_PIDFILE_DIR="/var/run"])
 AC_SUBST(ALSACTL_PIDFILE_DIR)
 
+AC_ARG_WITH([alsactl-home-dir],
+        AS_HELP_STRING([--with-alsactl-home-dir=DIR], [Directory to use as homedir for alsactl]),
+        [ALSACTL_HOME_DIR="$withval"],
+        [ALSACTL_HOME_DIR="/var/run/alsa"])
+AC_SUBST(ALSACTL_HOME_DIR)
+
 AC_ARG_WITH([alsactl-daemonswitch],
         AS_HELP_STRING([--with-alsactl-daemonswitch=FILE], [File to test for the daemon mode]),
         [ALSACTL_DAEMONSWITCH="$withval"],
Index: alsa-utils-1.0.28/alsactl/Makefile.am
===================================================================
--- alsa-utils-1.0.28.orig/alsactl/Makefile.am
+++ alsa-utils-1.0.28/alsactl/Makefile.am
@@ -45,6 +45,7 @@ endif
 edit = \
 	$(SED) -r -e 's,@sbindir\@,$(sbindir),g' \
 		  -e 's,@mydatadir\@,$(mydatadir),g' \
+		  -e 's,@alsactlhome\@,$(ALSACTL_HOME_DIR),g' \
 		  -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
 							< $< > $@ || rm $@
 
Index: alsa-utils-1.0.28/alsactl/alsa-restore.service.in
===================================================================
--- alsa-utils-1.0.28.orig/alsactl/alsa-restore.service.in
+++ alsa-utils-1.0.28/alsactl/alsa-restore.service.in
@@ -13,5 +13,5 @@ Conflicts=shutdown.target
 
 [Service]
 Type=oneshot
-ExecStart=-@sbindir@/alsactl restore
+ExecStart=-@sbindir@/alsactl -E HOME=@alsactlhome@ restore
 StandardOutput=syslog
Index: alsa-utils-1.0.28/alsactl/alsa-state.service.in
===================================================================
--- alsa-utils-1.0.28.orig/alsactl/alsa-state.service.in
+++ alsa-utils-1.0.28/alsactl/alsa-state.service.in
@@ -13,5 +13,5 @@ Conflicts=shutdown.target
 
 [Service]
 Type=simple
-ExecStart=-@sbindir@/alsactl -s -n 19 -c rdaemon
-ExecStop=-@sbindir@/alsactl -s kill save_and_quit
+ExecStart=-@sbindir@/alsactl -E HOME=@alsactlhome@ -s -n 19 -c rdaemon
+ExecStop=-@sbindir@/alsactl -E HOME=@alsactlhome@ -s kill save_and_quit
Index: alsa-utils-1.0.28/alsactl/alsa-store.service.in
===================================================================
--- alsa-utils-1.0.28.orig/alsactl/alsa-store.service.in
+++ alsa-utils-1.0.28/alsactl/alsa-store.service.in
@@ -11,5 +11,5 @@ Before=shutdown.target
 
 [Service]
 Type=oneshot
-ExecStart=@sbindir@/alsactl store
+ExecStart=@sbindir@/alsactl -E HOME=@alsactlhome@ store
 StandardOutput=syslog
Index: alsa-utils-1.0.28/alsactl/90-alsa-restore.rules.in
===================================================================
--- alsa-utils-1.0.28.orig/alsactl/90-alsa-restore.rules.in
+++ alsa-utils-1.0.28/alsactl/90-alsa-restore.rules.in
@@ -2,7 +2,7 @@ ACTION=="add", SUBSYSTEM=="sound", KERNE
 GOTO="alsa_restore_end"
 
 LABEL="alsa_restore_go"
-TEST!="@daemonswitch@", RUN+="@sbindir@/alsactl restore $attr{device/number}"
-TEST=="@daemonswitch@", RUN+="@sbindir@/alsactl nrestore $attr{device/number}"
+TEST!="@daemonswitch@", RUN+="@sbindir@/alsactl -E HOME=@alsactlhome@ restore $attr{device/number}"
+TEST=="@daemonswitch@", RUN+="@sbindir@/alsactl -E HOME=@alsactlhome@ nrestore $attr{device/number}"
 
 LABEL="alsa_restore_end"