2
1
Эх сурвалжийг харах

package/alsa-utils: install systemd service files

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Peter Seiderer 6 жил өмнө
parent
commit
f0ea36edc2

+ 14 - 0
package/alsa-utils/alsa-utils.mk

@@ -82,4 +82,18 @@ define ALSA_UTILS_INSTALL_TARGET_CMDS
 	fi
 endef
 
+ifeq ($(BR2_PACKAGE_ALSA_UTILS_ALSACTL),y)
+define ALSA_UTILS_INSTALL_INIT_SYSTEMD
+	$(INSTALL) -D -m 0644 $(@D)/alsactl/alsa-restore.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service
+	$(INSTALL) -D -m 0644 $(@D)/alsactl/alsa-state.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/sound.target.wants
+	ln -sf ../../../../lib/systemd/system/alsa-restore.service \
+		$(TARGET_DIR)/etc/systemd/system/sound.target.wants/alsa-restore.service
+	ln -sf ../../../../lib/systemd/system/alsa-state.service \
+		$(TARGET_DIR)/etc/systemd/system/sound.target.wants/alsa-state.service
+endef
+endif
+
 $(eval $(autotools-package))