blob: a78df2e112797ac8296be36cb5945a5118e89a14 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "ALSA sound utilities"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06002DESCRIPTION = "collection of small and often extremely powerful applications \
3designed to allow users to control the various parts of the ALSA system."
Andrew Geissler82c905d2020-04-13 13:39:40 -05004HOMEPAGE = "http://www.alsa-project.org"
5BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
6SECTION = "console/utils"
Andrew Geissler9aee5002022-03-30 16:27:02 +00007# Some parts are GPL-2.0-or-later, some are GPL-2.0-only (e.g. axfer, alsactl)
8# so result is GPL-2.0-only
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00009LICENSE = "GPL-2.0-only"
Andrew Geissler82c905d2020-04-13 13:39:40 -050010LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
11 file://alsactl/utils.c;beginline=3;endline=18;md5=96cc06a4cebe5eb7975688ffb0e65642"
12DEPENDS = "alsa-lib ncurses libsamplerate0"
13
14PACKAGECONFIG ??= "udev"
15
16# alsabat can be built also without fftw support (with reduced functionality).
17# It would be better to always enable alsabat, but provide an option for
18# enabling/disabling fftw. The configure script doesn't support that, however
19# (at least in any obvious way), so for now we only support alsabat with fftw
20# or no alsabat at all.
21PACKAGECONFIG[bat] = "--enable-bat,--disable-bat,fftwf"
22
23PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,--with-udev-rules-dir=/unwanted/rules.d,udev"
24PACKAGECONFIG[manpages] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
25
26# alsa-utils specified in SRC_URI due to alsa-utils-scripts recipe
27SRC_URI = "https://www.alsa-project.org/files/pub/utils/alsa-utils-${PV}.tar.bz2"
Andrew Geissler78b72792022-06-14 06:47:25 -050028SRC_URI[sha256sum] = "e906bf2404ff04c448eaa3d226d283a62b9a283f12e4fd8457fb24bac274e678"
Andrew Geissler82c905d2020-04-13 13:39:40 -050029
30# On build machines with python-docutils (not python3-docutils !!) installed
31# rst2man (not rst2man.py) is detected and compile fails with
32# | make[1]: *** No rule to make target 'alsaucm.1', needed by 'all-am'. Stop.
33# Avoid this by disabling expicitly
34EXTRA_OECONF = "--disable-rst2man"
35
36inherit autotools gettext pkgconfig manpages
37
38# This are all packages that we need to make. Also, the now empty alsa-utils
39# ipk depends on them.
40
41ALSA_UTILS_PKGS = "\
42 ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'alsa-utils-alsabat', '', d)} \
43 alsa-utils-alsamixer \
44 alsa-utils-alsatplg \
45 alsa-utils-midi \
46 alsa-utils-aplay \
47 alsa-utils-amixer \
48 alsa-utils-aconnect \
49 alsa-utils-iecset \
50 alsa-utils-speakertest \
51 alsa-utils-aseqnet \
52 alsa-utils-aseqdump \
53 alsa-utils-alsactl \
54 alsa-utils-alsaloop \
55 alsa-utils-alsaucm \
Andrew Geissler78b72792022-06-14 06:47:25 -050056 alsa-utils-scripts \
Andrew Geissler82c905d2020-04-13 13:39:40 -050057 "
58
59PACKAGES += "${ALSA_UTILS_PKGS}"
Patrick Williams213cb262021-08-07 19:21:33 -050060RDEPENDS:${PN} += "${ALSA_UTILS_PKGS}"
Andrew Geissler82c905d2020-04-13 13:39:40 -050061
Patrick Williams213cb262021-08-07 19:21:33 -050062FILES:${PN} = ""
63ALLOW_EMPTY:alsa-utils = "1"
64FILES:alsa-utils-alsabat = "${bindir}/alsabat"
Andrew Geissler78b72792022-06-14 06:47:25 -050065FILES:alsa-utils-alsatplg = "${bindir}/alsatplg ${libdir}/alsa-topology"
Patrick Williams213cb262021-08-07 19:21:33 -050066FILES:alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord ${bindir}/axfer"
67FILES:alsa-utils-amixer = "${bindir}/amixer"
68FILES:alsa-utils-alsamixer = "${bindir}/alsamixer"
69FILES:alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/"
70FILES:alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi"
71FILES:alsa-utils-aconnect = "${bindir}/aconnect"
72FILES:alsa-utils-aseqnet = "${bindir}/aseqnet"
73FILES:alsa-utils-iecset = "${bindir}/iecset"
74FILES:alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d/90-alsa-restore.rules */*/udev/rules.d/90-alsa-restore.rules ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/"
75FILES:alsa-utils-aseqdump = "${bindir}/aseqdump"
76FILES:alsa-utils-alsaloop = "${bindir}/alsaloop"
77FILES:alsa-utils-alsaucm = "${bindir}/alsaucm */udev/rules.d/89-alsa-ucm.rules */*/udev/rules.d/89-alsa-ucm.rules"
Andrew Geissler78b72792022-06-14 06:47:25 -050078FILES:alsa-utils-scripts = "${sbindir}/alsaconf \
79 ${sbindir}/alsa-info.sh \
80 ${sbindir}/alsabat-test.sh \
81 "
Andrew Geissler82c905d2020-04-13 13:39:40 -050082
Patrick Williams213cb262021-08-07 19:21:33 -050083SUMMARY:alsa-utils-alsabat = "Command-line sound tester for ALSA sound card driver"
84SUMMARY:alsa-utils-alsatplg = "Converts topology text files into binary format for kernel"
85SUMMARY:alsa-utils-aplay = "Play (and record) sound files using ALSA"
86SUMMARY:alsa-utils-amixer = "Command-line control for ALSA mixer and settings"
87SUMMARY:alsa-utils-alsamixer = "ncurses-based control for ALSA mixer and settings"
88SUMMARY:alsa-utils-speakertest = "ALSA surround speaker test utility"
89SUMMARY:alsa-utils-midi = "Miscellaneous MIDI utilities for ALSA"
90SUMMARY:alsa-utils-aconnect = "ALSA sequencer connection manager"
91SUMMARY:alsa-utils-aseqnet = "Network client/server for ALSA sequencer"
92SUMMARY:alsa-utils-iecset = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits"
93SUMMARY:alsa-utils-alsactl = "Saves/restores ALSA-settings in /etc/asound.state"
94SUMMARY:alsa-utils-aseqdump = "Shows the events received at an ALSA sequencer port"
95SUMMARY:alsa-utils-alsaloop = "ALSA PCM loopback utility"
96SUMMARY:alsa-utils-alsaucm = "ALSA Use Case Manager"
Andrew Geissler78b72792022-06-14 06:47:25 -050097SUMMARY:alsa-utils-scripts = "Shell scripts that show help info and create ALSA configuration files"
Andrew Geissler82c905d2020-04-13 13:39:40 -050098
Patrick Williams213cb262021-08-07 19:21:33 -050099RRECOMMENDS:alsa-utils-alsactl = "alsa-states"
Andrew Geissler82c905d2020-04-13 13:39:40 -0500100
101do_install() {
102 autotools_do_install
103
Andrew Geissler78b72792022-06-14 06:47:25 -0500104 install -d ${D}${sbindir}
105 install -m 0755 ${B}/alsaconf/alsaconf ${D}${sbindir}/
106 install -m 0755 ${S}/alsa-info/alsa-info.sh ${D}${sbindir}/
107 if ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'true', 'false', d)}; then
108 install -m 0755 ${S}/bat/alsabat-test.sh ${D}${sbindir}/
109 fi
Andrew Geissler82c905d2020-04-13 13:39:40 -0500110
111 # If udev is disabled, we told configure to install the rules
112 # in /unwanted, so we can remove them now. If udev is enabled,
113 # then /unwanted won't exist and this will have no effect.
114 rm -rf ${D}/unwanted
115}
Andrew Geissler78b72792022-06-14 06:47:25 -0500116
117
118PROVIDES = "alsa-utils-alsaconf alsa-utils-scripts"
119
120RDEPENDS:${PN}-scripts += "bash"