2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2007-07-23 10:10:52 +02:00
|
|
|
#
|
|
|
|
# alsa-utils
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-03-11 22:48:09 +01:00
|
|
|
|
2022-01-02 18:46:59 +01:00
|
|
|
ALSA_UTILS_VERSION = 1.2.6
|
2010-12-12 22:54:00 +01:00
|
|
|
ALSA_UTILS_SOURCE = alsa-utils-$(ALSA_UTILS_VERSION).tar.bz2
|
2020-04-13 13:53:02 +02:00
|
|
|
ALSA_UTILS_SITE = https://www.alsa-project.org/files/pub/utils
|
2017-03-30 15:43:32 +02:00
|
|
|
ALSA_UTILS_LICENSE = GPL-2.0
|
2012-08-19 22:18:24 +02:00
|
|
|
ALSA_UTILS_LICENSE_FILES = COPYING
|
2010-12-12 22:54:00 +01:00
|
|
|
ALSA_UTILS_INSTALL_STAGING = YES
|
2017-07-03 21:14:53 +02:00
|
|
|
ALSA_UTILS_DEPENDENCIES = host-pkgconf alsa-lib \
|
2016-01-18 22:13:59 +01:00
|
|
|
$(if $(BR2_PACKAGE_NCURSES),ncurses) \
|
2017-07-03 21:14:53 +02:00
|
|
|
$(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate) \
|
|
|
|
$(TARGET_NLS_DEPENDENCIES)
|
2007-07-23 10:10:52 +02:00
|
|
|
|
2021-01-28 10:27:49 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_ALSA_UTILS_ALSACTL),y)
|
|
|
|
ALSA_UTILS_SELINUX_MODULES += alsa
|
|
|
|
endif
|
|
|
|
|
2010-12-12 22:54:00 +01:00
|
|
|
ALSA_UTILS_CONF_ENV = \
|
2017-07-03 21:14:53 +02:00
|
|
|
ac_cv_prog_ncurses5_config=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS) \
|
|
|
|
LIBS=$(TARGET_NLS_LIBS)
|
2007-07-23 10:10:52 +02:00
|
|
|
|
2014-09-27 21:32:44 +02:00
|
|
|
ALSA_UTILS_CONF_OPTS = \
|
2010-12-12 22:54:00 +01:00
|
|
|
--disable-xmlto \
|
2017-01-01 11:07:53 +01:00
|
|
|
--disable-rst2man \
|
2014-09-17 15:08:20 +02:00
|
|
|
--with-curses=$(if $(BR2_PACKAGE_NCURSES_WCHAR),ncursesw,ncurses)
|
2007-07-23 10:10:52 +02:00
|
|
|
|
2016-01-18 22:13:59 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_ALSA_UTILS_ALSALOOP),y)
|
|
|
|
ALSA_UTILS_CONF_OPTS += --enable-alsaloop
|
|
|
|
else
|
|
|
|
ALSA_UTILS_CONF_OPTS += --disable-alsaloop
|
|
|
|
endif
|
|
|
|
|
2010-12-12 22:54:00 +01:00
|
|
|
ifneq ($(BR2_PACKAGE_ALSA_UTILS_ALSAMIXER),y)
|
2019-12-07 10:17:43 +01:00
|
|
|
ALSA_UTILS_CONF_OPTS += --disable-alsamixer
|
2010-12-12 22:54:00 +01:00
|
|
|
endif
|
2007-07-23 10:10:52 +02:00
|
|
|
|
2015-11-11 01:47:25 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_ALSA_UTILS_BAT),y)
|
|
|
|
ALSA_UTILS_CONF_OPTS += --enable-bat
|
2018-07-03 06:29:36 +02:00
|
|
|
# Analysis support requires fftw single precision
|
2019-01-21 14:51:00 +01:00
|
|
|
ALSA_UTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_FFTW_SINGLE),fftw-single)
|
2015-11-11 01:47:25 +01:00
|
|
|
else
|
|
|
|
ALSA_UTILS_CONF_OPTS += --disable-bat
|
|
|
|
endif
|
|
|
|
|
2007-08-22 14:35:41 +02:00
|
|
|
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSACONF) += usr/sbin/alsaconf
|
|
|
|
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSACTL) += usr/sbin/alsactl
|
2016-01-18 22:13:59 +01:00
|
|
|
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSALOOP) += usr/bin/alsaloop
|
2007-08-22 14:35:41 +02:00
|
|
|
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSAMIXER) += usr/bin/alsamixer
|
2016-01-16 18:10:24 +01:00
|
|
|
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSATPLG) += usr/bin/alsatplg
|
2007-08-22 14:35:41 +02:00
|
|
|
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_AMIDI) += usr/bin/amidi
|
|
|
|
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_AMIXER) += usr/bin/amixer
|
2011-03-14 23:59:10 +01:00
|
|
|
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_APLAY) += usr/bin/aplay usr/bin/arecord
|
2016-03-31 22:07:22 +02:00
|
|
|
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_BAT) += usr/bin/alsabat
|
2007-08-22 14:35:41 +02:00
|
|
|
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_IECSET) += usr/bin/iecset
|
|
|
|
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ACONNECT) += usr/bin/aconnect
|
2015-04-21 12:19:51 +02:00
|
|
|
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSAUCM) += usr/bin/alsaucm
|
2007-08-22 14:35:41 +02:00
|
|
|
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_APLAYMIDI) += usr/bin/aplaymidi
|
|
|
|
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ARECORDMIDI) += usr/bin/arecordmidi
|
|
|
|
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ASEQDUMP) += usr/bin/aseqdump
|
|
|
|
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ASEQNET) += usr/bin/aseqnet
|
|
|
|
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST) += usr/bin/speaker-test
|
2007-07-23 10:10:52 +02:00
|
|
|
|
2010-12-12 22:54:00 +01:00
|
|
|
define ALSA_UTILS_INSTALL_TARGET_CMDS
|
2011-04-20 19:41:53 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/var/lib/alsa
|
2010-12-12 22:54:00 +01:00
|
|
|
for i in $(ALSA_UTILS_TARGETS_y); do \
|
2014-11-30 15:18:26 +01:00
|
|
|
$(INSTALL) -D -m 755 $(STAGING_DIR)/$$i $(TARGET_DIR)/$$i || exit 1; \
|
2007-07-23 10:10:52 +02:00
|
|
|
done
|
2007-08-22 11:56:41 +02:00
|
|
|
if [ -x "$(TARGET_DIR)/usr/bin/speaker-test" ]; then \
|
2007-07-23 10:10:52 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/usr/share/alsa/speaker-test; \
|
|
|
|
mkdir -p $(TARGET_DIR)/usr/share/sounds/alsa; \
|
|
|
|
cp -rdpf $(STAGING_DIR)/usr/share/alsa/speaker-test/* $(TARGET_DIR)/usr/share/alsa/speaker-test/; \
|
|
|
|
cp -rdpf $(STAGING_DIR)/usr/share/sounds/alsa/* $(TARGET_DIR)/usr/share/sounds/alsa/; \
|
2007-08-21 21:20:18 +02:00
|
|
|
fi
|
2010-04-26 22:58:25 +02:00
|
|
|
if [ -x "$(TARGET_DIR)/usr/sbin/alsactl" ]; then \
|
|
|
|
mkdir -p $(TARGET_DIR)/usr/share/; \
|
2021-12-11 03:50:34 +01:00
|
|
|
cp -rdpf $(STAGING_DIR)/usr/share/alsa/* $(TARGET_DIR)/usr/share/alsa/; \
|
2010-04-26 22:58:25 +02:00
|
|
|
fi
|
2010-12-12 22:54:00 +01:00
|
|
|
endef
|
2009-01-23 00:06:28 +01:00
|
|
|
|
2018-11-21 23:01:02 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_ALSA_UTILS_ALSACTL)$(BR2_INIT_SYSTEMD),yy)
|
|
|
|
ALSA_UTILS_DEPENDENCIES += systemd
|
2018-12-14 16:54:35 +01:00
|
|
|
ALSA_UTILS_CONF_OPTS += --with-systemdsystemunitdir=/usr/lib/systemd/system
|
2018-10-30 23:41:39 +01:00
|
|
|
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
|
2020-09-03 15:35:33 +02:00
|
|
|
$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service.d
|
2019-12-16 11:30:52 +01:00
|
|
|
printf '[Install]\nWantedBy=multi-user.target\n' \
|
|
|
|
>$(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service.d/buildroot-enable.conf
|
2020-09-03 15:35:33 +02:00
|
|
|
$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service.d
|
2019-12-16 11:30:52 +01:00
|
|
|
printf '[Install]\nWantedBy=multi-user.target\n' \
|
|
|
|
>$(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service.d/buildroot-enable.conf;
|
2018-10-30 23:41:39 +01:00
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|