tarina

git clone https://git.tarina.org/tarina
Log | Files | Refs | README | LICENSE

alsactl_home.patch (3180B)


      1 Author: Jordi Mallach <jordi@debian.org>
      2 Description: add new configure switch to set alsactl's homedir.
      3 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=712980
      4 
      5 Index: alsa-utils-1.1.3/configure.ac
      6 ===================================================================
      7 --- alsa-utils-1.1.3.orig/configure.ac
      8 +++ alsa-utils-1.1.3/configure.ac
      9 @@ -409,6 +409,12 @@ AC_ARG_WITH([alsactl-pidfile-dir],
     10          [ALSACTL_PIDFILE_DIR="/var/run"])
     11  AC_SUBST(ALSACTL_PIDFILE_DIR)
     12  
     13 +AC_ARG_WITH([alsactl-home-dir],
     14 +        AS_HELP_STRING([--with-alsactl-home-dir=DIR], [Directory to use as homedir for alsactl]),
     15 +        [ALSACTL_HOME_DIR="$withval"],
     16 +        [ALSACTL_HOME_DIR="/var/run/alsa"])
     17 +AC_SUBST(ALSACTL_HOME_DIR)
     18 +
     19  AC_ARG_WITH([alsactl-daemonswitch],
     20          AS_HELP_STRING([--with-alsactl-daemonswitch=FILE], [File to test for the daemon mode]),
     21          [ALSACTL_DAEMONSWITCH="$withval"],
     22 Index: alsa-utils-1.1.3/alsactl/Makefile.am
     23 ===================================================================
     24 --- alsa-utils-1.1.3.orig/alsactl/Makefile.am
     25 +++ alsa-utils-1.1.3/alsactl/Makefile.am
     26 @@ -40,6 +40,7 @@ endif
     27  edit = \
     28  	$(SED) -r -e 's,@sbindir\@,$(sbindir),g' \
     29  		  -e 's,@mydatadir\@,$(mydatadir),g' \
     30 +		  -e 's,@alsactlhome\@,$(ALSACTL_HOME_DIR),g' \
     31  		  -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
     32  							< $< > $@ || rm $@
     33  
     34 Index: alsa-utils-1.1.3/alsactl/alsa-restore.service.in
     35 ===================================================================
     36 --- alsa-utils-1.1.3.orig/alsactl/alsa-restore.service.in
     37 +++ alsa-utils-1.1.3/alsactl/alsa-restore.service.in
     38 @@ -12,6 +12,6 @@ After=alsa-state.service
     39  [Service]
     40  Type=oneshot
     41  RemainAfterExit=true
     42 -ExecStart=-@sbindir@/alsactl restore
     43 -ExecStop=-@sbindir@/alsactl store
     44 +ExecStart=-@sbindir@/alsactl -E HOME=@alsactlhome@ restore
     45 +ExecStop=-@sbindir@/alsactl -E HOME=@alsactlhome@ store
     46  StandardOutput=syslog
     47 Index: alsa-utils-1.1.3/alsactl/alsa-state.service.in
     48 ===================================================================
     49 --- alsa-utils-1.1.3.orig/alsactl/alsa-state.service.in
     50 +++ alsa-utils-1.1.3/alsactl/alsa-state.service.in
     51 @@ -10,5 +10,5 @@ After=sysinit.target
     52  
     53  [Service]
     54  Type=simple
     55 -ExecStart=-@sbindir@/alsactl -s -n 19 -c rdaemon
     56 -ExecStop=-@sbindir@/alsactl -s kill save_and_quit
     57 +ExecStart=-@sbindir@/alsactl -E HOME=@alsactlhome@ -s -n 19 -c rdaemon
     58 +ExecStop=-@sbindir@/alsactl -E HOME=@alsactlhome@ -s kill save_and_quit
     59 Index: alsa-utils-1.1.3/alsactl/90-alsa-restore.rules.in
     60 ===================================================================
     61 --- alsa-utils-1.1.3.orig/alsactl/90-alsa-restore.rules.in
     62 +++ alsa-utils-1.1.3/alsactl/90-alsa-restore.rules.in
     63 @@ -2,7 +2,7 @@ ACTION=="add", SUBSYSTEM=="sound", KERNE
     64  GOTO="alsa_restore_end"
     65  
     66  LABEL="alsa_restore_go"
     67 -TEST!="@daemonswitch@", RUN+="@sbindir@/alsactl restore $attr{device/number}"
     68 -TEST=="@daemonswitch@", RUN+="@sbindir@/alsactl nrestore $attr{device/number}"
     69 +TEST!="@daemonswitch@", RUN+="@sbindir@/alsactl -E HOME=@alsactlhome@ restore $attr{device/number}"
     70 +TEST=="@daemonswitch@", RUN+="@sbindir@/alsactl -E HOME=@alsactlhome@ nrestore $attr{device/number}"
     71  
     72  LABEL="alsa_restore_end"