2007-04-19 04:26:03 +02:00
|
|
|
#
|
2011-06-03 15:33:27 +02:00
|
|
|
# spec file for package alsa-utils
|
2007-04-19 04:26:03 +02:00
|
|
|
#
|
2024-01-08 13:04:12 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2007-04-19 04:26:03 +02:00
|
|
|
#
|
2008-08-07 01:09:36 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-05-28 20:57:39 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-04-19 04:26:03 +02:00
|
|
|
#
|
2011-12-22 20:29:06 +01:00
|
|
|
|
2012-05-29 11:34:36 +02:00
|
|
|
|
2024-02-02 17:33:45 +01:00
|
|
|
%define do_autoreconf 0
|
2013-05-27 15:40:57 +02:00
|
|
|
%define _udevdir %(pkg-config --variable=udevdir udev)
|
2022-06-01 08:18:30 +02:00
|
|
|
%ifarch %ix86 x86_64 %arm aarch64 ppc64le riscv64
|
|
|
|
%define enable_topology 1
|
|
|
|
%else
|
|
|
|
%define enable_topology 0
|
|
|
|
%endif
|
|
|
|
|
2007-04-19 04:26:03 +02:00
|
|
|
Name: alsa-utils
|
2024-02-02 17:33:45 +01:00
|
|
|
Version: 1.2.11
|
2014-03-11 12:08:44 +01:00
|
|
|
Release: 0
|
2007-04-19 04:26:03 +02:00
|
|
|
Summary: Advanced Linux Sound Architecture Utilities
|
2018-04-04 12:00:29 +02:00
|
|
|
License: GPL-2.0-or-later
|
2012-01-25 16:53:38 +01:00
|
|
|
Group: Productivity/Multimedia/Sound/Players
|
2019-01-22 22:09:10 +01:00
|
|
|
URL: http://www.alsa-project.org/
|
2021-12-06 15:32:39 +01:00
|
|
|
Source: https://www.alsa-project.org/files/pub/utils/alsa-utils-%{version}.tar.bz2
|
|
|
|
Source1: https://www.alsa-project.org/files/pub/utils/alsa-utils-%{version}.tar.bz2.sig
|
|
|
|
Source2: 01beep.conf
|
|
|
|
Source3: sound-extra.service
|
2019-05-28 20:57:39 +02:00
|
|
|
Source5: load-sound-modules.sh
|
2022-10-25 10:13:33 +02:00
|
|
|
# from https://www.alsa-project.org/files/pub/gpg-release-key-v1.txt
|
|
|
|
Source6: alsa-utils.keyring
|
2023-09-04 17:27:54 +02:00
|
|
|
# upstream fixes
|
2024-02-02 17:33:45 +01:00
|
|
|
# downstream fixes
|
2021-04-26 10:44:56 +02:00
|
|
|
Patch100: alsa-info-no-update-for-distro-script.patch
|
2019-01-08 19:38:14 +01:00
|
|
|
Patch101: alsa-utils-configure-version-revert.patch
|
2014-03-11 12:08:44 +01:00
|
|
|
BuildRequires: alsa-devel
|
2022-06-01 08:18:30 +02:00
|
|
|
%if %enable_topology
|
2019-11-18 11:23:08 +01:00
|
|
|
BuildRequires: alsa-topology-devel
|
2020-10-05 12:45:34 +02:00
|
|
|
%endif
|
2015-11-09 14:55:57 +01:00
|
|
|
BuildRequires: fftw3-devel
|
2014-03-11 12:08:44 +01:00
|
|
|
BuildRequires: libsamplerate-devel
|
|
|
|
BuildRequires: ncurses-devel
|
|
|
|
BuildRequires: pkgconfig
|
2020-02-17 12:44:32 +01:00
|
|
|
%if 0%{?suse_version} < 1500
|
|
|
|
BuildRequires: python-docutils
|
|
|
|
%else
|
2019-12-20 17:28:48 +01:00
|
|
|
BuildRequires: python3-docutils
|
2020-02-17 12:44:32 +01:00
|
|
|
%endif
|
2014-03-11 12:08:44 +01:00
|
|
|
BuildRequires: xmlto
|
2019-11-18 11:23:08 +01:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
2019-01-22 22:09:10 +01:00
|
|
|
BuildRequires: pkgconfig(udev)
|
2020-01-22 15:28:06 +01:00
|
|
|
%if 0%{?do_autoreconf}
|
|
|
|
BuildRequires: automake
|
2022-06-01 08:18:30 +02:00
|
|
|
BuildRequires: libtool
|
2020-01-22 15:28:06 +01:00
|
|
|
%endif
|
2014-03-11 12:08:44 +01:00
|
|
|
Requires: alsa
|
2019-01-22 22:09:10 +01:00
|
|
|
# for alsa-info.sh
|
2014-03-11 12:08:44 +01:00
|
|
|
Requires: dialog
|
|
|
|
Requires: pciutils
|
2007-04-19 04:26:03 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
This package contains utility programs supporting ALSA, Advanced Linux
|
|
|
|
Sound Architecture.
|
|
|
|
|
2016-03-03 10:24:30 +01:00
|
|
|
%package -n alsabat
|
2015-11-09 14:55:57 +01:00
|
|
|
Summary: Command-line sound tester for ALSA sound card driver
|
|
|
|
Group: Productivity/Multimedia/Sound/Utilities
|
|
|
|
Requires: alsa-utils = %{version}
|
|
|
|
|
2016-03-03 10:24:30 +01:00
|
|
|
%description -n alsabat
|
2015-11-09 14:55:57 +01:00
|
|
|
BAT (Basic Audio Tester) is a simple command-line utility intended
|
|
|
|
to help automate audio driver and sound server testing with little human
|
|
|
|
interaction. BAT can be used to test audio quality, stress test features
|
|
|
|
and test audio before and after PM state changes.
|
|
|
|
|
2007-04-19 04:26:03 +02:00
|
|
|
%prep
|
2018-04-08 12:17:08 +02:00
|
|
|
%setup -q
|
2024-02-20 12:24:42 +01:00
|
|
|
%patch -P 100 -p1
|
2019-01-08 19:38:14 +01:00
|
|
|
%if 0%{?do_autoreconf}
|
2024-02-20 12:24:42 +01:00
|
|
|
%patch -P 101 -p1
|
2009-02-16 16:03:39 +01:00
|
|
|
# fix stupid automake's automatic action
|
2009-06-02 18:42:15 +02:00
|
|
|
sed -i -e's/EXTRA_DIST= config.rpath /EXTRA_DIST=/' Makefile.am
|
2019-01-08 19:38:14 +01:00
|
|
|
%endif
|
2007-04-19 04:26:03 +02:00
|
|
|
|
|
|
|
%build
|
2011-09-18 13:06:22 +02:00
|
|
|
export AUTOMAKE_JOBS="%{?_smp_mflags}"
|
2019-01-08 19:38:14 +01:00
|
|
|
%if 0%{?do_autoreconf}
|
2020-01-22 15:28:06 +01:00
|
|
|
gettextize -c -f --no-changelog
|
2015-08-05 11:00:41 +02:00
|
|
|
autoreconf -fi
|
2019-01-08 19:38:14 +01:00
|
|
|
%endif
|
2019-01-22 22:09:10 +01:00
|
|
|
%configure --with-curses=ncursesw \
|
|
|
|
--with-systemdsystemunitdir=%{_unitdir} \
|
2020-10-18 19:18:56 +02:00
|
|
|
--with-udev-rules-dir=%{_udevdir}/rules.d \
|
|
|
|
--with-alsactl-lock-dir=/run/lock
|
2011-09-18 13:06:22 +02:00
|
|
|
make %{?_smp_mflags}
|
2007-04-19 04:26:03 +02:00
|
|
|
|
|
|
|
%install
|
2019-01-22 22:09:10 +01:00
|
|
|
%make_install
|
2014-03-11 12:08:44 +01:00
|
|
|
mkdir -p %{buildroot}%{_datadir}/alsa/init/preinit
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/alsa/init/postinit
|
2022-06-01 08:18:30 +02:00
|
|
|
%if %enable_topology
|
|
|
|
rm -f %{_libdir}/alsa-topology/*.la
|
|
|
|
%endif
|
2012-06-19 12:54:24 +02:00
|
|
|
for i in %{_sourcedir}/[0-9]*.conf; do
|
2014-03-11 12:08:44 +01:00
|
|
|
install -c -m 0644 $i %{buildroot}%{_datadir}/alsa/init/postinit
|
2012-06-19 12:54:24 +02:00
|
|
|
done
|
2019-01-22 22:09:10 +01:00
|
|
|
# remove obsoleted alsaconf script
|
|
|
|
rm -f %{buildroot}%{_sbindir}/alsaconf
|
|
|
|
rm -f %{buildroot}%{_datadir}/locale/*/*/alsaconf.mo
|
|
|
|
rm -f %{buildroot}%{_mandir}/*/man*/alsaconf.*
|
|
|
|
rm -f %{buildroot}%{_mandir}/man*/alsaconf.*
|
2019-12-20 17:28:48 +01:00
|
|
|
rmdir --ignore-fail-on-non-empty -p %{buildroot}%{_mandir}/*/man* %{buildroot}%{_mandir}/man*
|
2007-05-25 00:39:40 +02:00
|
|
|
%find_lang %{name} --all-name
|
2012-11-03 19:49:47 +01:00
|
|
|
ln -s alsa-restore.service %{buildroot}%{_unitdir}/alsasound.service
|
2014-03-11 12:08:44 +01:00
|
|
|
mkdir -p %{buildroot}%{_localstatedir}/lib/alsa
|
2019-05-28 20:57:39 +02:00
|
|
|
# systemd unit files
|
2021-12-06 15:32:39 +01:00
|
|
|
install -c -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}
|
2019-05-28 20:57:39 +02:00
|
|
|
ln -s ../sound-extra.service %{buildroot}%{_unitdir}/sound.target.wants
|
2019-11-24 21:12:58 +01:00
|
|
|
mkdir -p %{buildroot}%{_prefix}/lib/systemd/scripts
|
|
|
|
install -c -m 0755 %{SOURCE5} %{buildroot}%{_prefix}/lib/systemd/scripts
|
2019-05-28 20:57:39 +02:00
|
|
|
|
|
|
|
%pre
|
|
|
|
%service_add_pre sound-extra.service
|
|
|
|
|
|
|
|
%post
|
|
|
|
%service_add_post sound-extra.service
|
2020-10-18 23:58:16 +02:00
|
|
|
# migrate the old asound.state
|
2021-03-18 08:59:26 +01:00
|
|
|
if [ ! -f %{_localstatedir}/lib/alsa/asound.state ]; then
|
2020-10-18 23:58:16 +02:00
|
|
|
test -f /etc/asound.state && \
|
|
|
|
cp -a /etc/asound.state %{_localstatedir}/lib/alsa/asound.state
|
2021-03-18 08:59:26 +01:00
|
|
|
fi
|
2020-10-18 23:58:16 +02:00
|
|
|
exit 0
|
2019-05-28 20:57:39 +02:00
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun sound-extra.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun sound-extra.service
|
2007-04-19 04:26:03 +02:00
|
|
|
|
2007-05-25 00:39:40 +02:00
|
|
|
%files -f %{name}.lang
|
2018-04-04 12:00:29 +02:00
|
|
|
%license COPYING
|
2019-12-20 17:28:48 +01:00
|
|
|
%doc README.md
|
2007-04-19 04:26:03 +02:00
|
|
|
%doc seq/aconnect/README*
|
|
|
|
%doc seq/aseqnet/README*
|
2015-11-09 14:55:57 +01:00
|
|
|
%{_mandir}/man*/*
|
2007-04-19 04:26:03 +02:00
|
|
|
%{_bindir}/*
|
2019-01-22 22:09:10 +01:00
|
|
|
%{_sbindir}/*
|
2016-03-03 10:24:30 +01:00
|
|
|
%exclude %{_bindir}/alsabat
|
2019-01-22 22:09:10 +01:00
|
|
|
%exclude %{_sbindir}/alsabat-test.sh
|
2022-06-01 08:18:30 +02:00
|
|
|
%if %enable_topology
|
|
|
|
%{_libdir}/alsa-topology
|
|
|
|
%endif
|
2016-03-03 10:24:30 +01:00
|
|
|
%exclude %{_mandir}/man*/alsabat.*
|
2007-04-19 04:26:03 +02:00
|
|
|
%{_datadir}/sounds/alsa
|
|
|
|
%{_datadir}/alsa
|
2013-05-27 15:40:57 +02:00
|
|
|
%{_udevdir}
|
2012-11-03 19:49:47 +01:00
|
|
|
%{_unitdir}/*.service
|
2017-11-14 16:03:06 +01:00
|
|
|
%{_unitdir}/sound.target.wants
|
2019-11-24 21:12:58 +01:00
|
|
|
%{_prefix}/lib/systemd/scripts
|
2014-03-11 12:08:44 +01:00
|
|
|
%{_localstatedir}/lib/alsa
|
2007-12-05 23:34:26 +01:00
|
|
|
|
2016-03-03 10:24:30 +01:00
|
|
|
%files -n alsabat
|
2018-04-04 12:00:29 +02:00
|
|
|
%license COPYING
|
2016-03-03 10:24:30 +01:00
|
|
|
%{_bindir}/alsabat
|
2019-01-22 22:09:10 +01:00
|
|
|
%{_sbindir}/alsabat-test.sh
|
2016-03-03 10:24:30 +01:00
|
|
|
%{_mandir}/man*/alsabat.*
|
2015-11-09 14:55:57 +01:00
|
|
|
|
2007-04-19 04:26:03 +02:00
|
|
|
%changelog
|