07b017
#define  prever     rc3
07b017
#define  prever_dot .rc3
07b017
#define  postver    a
07b017
10854d
%define version_alsa_lib  1.2.7.2
10854d
%define version_alsa_ucm  1.2.7.2
07b017
%define version_alsa_tplg 1.2.5
07b017
07b017
Summary:  The Advanced Linux Sound Architecture (ALSA) library
07b017
Name:     alsa-lib
07b017
Version:  %{version_alsa_lib}
10854d
Release:  1%{?prever_dot}%{?dist}
07b017
License:  LGPLv2+
07b017
URL:      http://www.alsa-project.org/
07b017
07b017
Source:   ftp://ftp.alsa-project.org/pub/lib/%{name}-%{version}%{?prever}%{?postver}.tar.bz2
07b017
Source1:  ftp://ftp.alsa-project.org/pub/lib/alsa-ucm-conf-%{version_alsa_ucm}.tar.bz2
07b017
Source2:  ftp://ftp.alsa-project.org/pub/lib/alsa-topology-conf-%{version_alsa_tplg}.tar.bz2
07b017
Source10: asound.conf
07b017
Source11: modprobe-dist-alsa.conf
07b017
Source12: modprobe-dist-oss.conf
07b017
Source40: alsa-ucm-conf.patch
07b017
Patch0:   alsa-git.patch
07b017
Patch1:   alsa-lib-1.2.3.1-config.patch
07b017
Patch2:   alsa-lib-1.0.14-glibc-open.patch
07b017
07b017
BuildRequires:  doxygen
07b017
BuildRequires:  autoconf automake libtool
07b017
BuildRequires: make
07b017
07b017
%description
07b017
The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI
07b017
functionality to the Linux operating system.
07b017
07b017
This package includes the ALSA runtime libraries to simplify application
07b017
programming and provide higher level functionality as well as support for
07b017
the older OSS API, providing binary compatibility for most OSS programs.
07b017
07b017
%package  devel
07b017
Summary:  Development files from the ALSA library
07b017
Requires: %{name} = %{version}-%{release}
07b017
Requires: pkgconfig
07b017
07b017
%description devel
07b017
The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI
07b017
functionality to the Linux operating system.
07b017
07b017
This package includes the ALSA development libraries for developing
07b017
against the ALSA libraries and interfaces.
07b017
07b017
%package  -n alsa-ucm
07b017
Summary:   ALSA Use Case Manager configuration
07b017
BuildArch: noarch
07b017
License:   BSD
07b017
Requires:  %{name} >= %{version_alsa_lib}
07b017
07b017
%description -n alsa-ucm
07b017
The Advanced Linux Sound Architecture (ALSA) Use Case Manager configuration
07b017
contains alsa-lib configuration of Audio input/output names and routing
07b017
07b017
%package  -n alsa-topology
07b017
Summary:   ALSA Topology configuration
07b017
BuildArch: noarch
07b017
License:   BSD
07b017
Requires:  %{name} >= %{version_alsa_lib}
07b017
07b017
%description -n alsa-topology
07b017
The Advanced Linux Sound Architecture (ALSA) topology configuration
07b017
contains alsa-lib configuration of SoC topology
07b017
07b017
%prep
07b017
%setup -q -n %{name}-%{version}%{?prever}%{?postver}
07b017
%patch0 -p1 -b .alsa-git
07b017
%patch1 -p1 -b .config
07b017
%patch2 -p1 -b .glibc-open
07b017
07b017
%build
07b017
# This package uses top level ASM constructs which are incompatible with LTO.
07b017
# Top level ASMs are often used to implement symbol versioning.  gcc-10
07b017
# introduces a new mechanism for symbol versioning which works with LTO.
07b017
# Converting packages to use that mechanism instead of toplevel ASMs is
07b017
# recommended.
07b017
# Note: The v1.2.4 contains changes wich are compatible with gcc-10 LTO
07b017
# although using the old ASM constructs.
07b017
# Enable custom LTO flags
07b017
%define _lto_cflags -flto -ffat-lto-objects -flto-partition=none
07b017
07b017
autoreconf -vif
07b017
%configure --disable-aload --with-plugindir=%{_libdir}/alsa-lib --disable-alisp
07b017
07b017
# Remove useless /usr/lib64 rpath on 64bit archs
07b017
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
07b017
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
07b017
07b017
make %{?_smp_mflags} V=1
07b017
make doc
07b017
07b017
%install
07b017
%global sysmodprobedir %{_prefix}/lib/modprobe.d
07b017
07b017
make DESTDIR=%{buildroot} install
07b017
07b017
# Install global configuration files
07b017
mkdir -p -m 755 %{buildroot}/etc
07b017
install -p -m 644 %{SOURCE10} %{buildroot}/etc
07b017
07b017
# Install the modprobe files for ALSA
07b017
mkdir -p -m 755 %{buildroot}%{sysmodprobedir}
07b017
install -p -m 644 %{SOURCE11} %{buildroot}%{sysmodprobedir}/dist-alsa.conf
07b017
# bug#926973, place this file to the doc directory
07b017
install -p -m 644 %{SOURCE12} .
07b017
07b017
# Create UCM directories
07b017
mkdir -p %{buildroot}/%{_datadir}/alsa/ucm
07b017
mkdir -p %{buildroot}/%{_datadir}/alsa/ucm2
07b017
07b017
# Unpack UCMs
07b017
tar xvjf %{SOURCE1} -C %{buildroot}/%{_datadir}/alsa --strip-components=1 "*/ucm" "*/ucm2"
07b017
patch -d %{buildroot}/%{_datadir}/alsa -p1 < %{SOURCE40}
07b017
07b017
# Create topology directory
07b017
mkdir -p %{buildroot}/%{_datadir}/alsa/topology
07b017
07b017
# Unpack topologies
07b017
tar xvjf %{SOURCE2} -C %{buildroot}/%{_datadir}/alsa --strip-components=1 "*/topology"
07b017
07b017
# Remove libtool archives.
07b017
find %{buildroot} -name '*.la' -delete
07b017
07b017
# Remove /usr/include/asoundlib.h
07b017
rm %{buildroot}/%{_includedir}/asoundlib.h
07b017
07b017
%ldconfig_scriptlets
07b017
07b017
%files
07b017
%{!?_licensedir:%global license %%doc}
07b017
%license COPYING
07b017
%doc doc/asoundrc.txt modprobe-dist-oss.conf
07b017
%config %{_sysconfdir}/asound.conf
07b017
/%{_libdir}/libasound.so.*
07b017
/%{_libdir}/libatopology.so.*
07b017
%{_bindir}/aserver
07b017
#{_libdir}/alsa-lib/
07b017
%{_datadir}/alsa/
07b017
%exclude %{_datadir}/alsa/ucm
07b017
%exclude %{_datadir}/alsa/ucm2
07b017
%exclude %{_datadir}/alsa/topology
07b017
%{sysmodprobedir}/dist-*
07b017
07b017
%files devel
07b017
%doc TODO doc/doxygen/
07b017
%{_includedir}/alsa/
07b017
%{_includedir}/sys/asoundlib.h
07b017
%{_libdir}/libasound.so
07b017
%{_libdir}/libatopology.so
07b017
%{_libdir}/pkgconfig/alsa.pc
07b017
%{_libdir}/pkgconfig/alsa-topology.pc
07b017
%{_datadir}/aclocal/alsa.m4
07b017
07b017
%files -n alsa-ucm
07b017
# BSD
07b017
%{_datadir}/alsa/ucm
07b017
%{_datadir}/alsa/ucm2
07b017
07b017
%files -n alsa-topology
07b017
# BSD
07b017
%{_datadir}/alsa/topology
07b017
07b017
%changelog
10854d
* Fri Jul  8 2022 Jaroslav Kysela <perex@perex.cz> - 1.2.7.2-1
10854d
- update to alsa-lib 1.2.7.2 and alsa-ucm-conf 1.2.7.2
10854d
07b017
* Wed Feb  9 2022 Jaroslav Kysela <perex@perex.cz> - 1.2.6.1-3
07b017
- import fixes from upstream (UCM: AMD ACP6x, HDA, sof-hda-dsp)
07b017
07b017
* Mon Dec 20 2021 Jaroslav Kysela <perex@perex.cz> - 1.2.6.1-1
07b017
- update to alsa-lib 1.2.6.1 and alsa-ucm-conf 1.2.6.3
07b017
07b017
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.2.5.1-2
07b017
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
07b017
  Related: rhbz#1991688
07b017
07b017
* Thu Jul 29 2021 Jaroslav Kysela <perex@perex.cz> - 1.2.5.1-1
07b017
- update to 1.2.5.1
07b017
07b017
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1.2.4-6
07b017
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
07b017
07b017
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.4-5
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
07b017
07b017
* Mon Oct 19 2020 Jaroslav Kysela <perex@perex.cz> - 1.2.4-4
07b017
- update to 1.2.4
07b017
- enable LTO
07b017
07b017
* Fri Jul 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.3.2-5
07b017
- Second attempt - Rebuilt for
07b017
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
07b017
07b017
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.3.2-4
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
07b017
07b017
* Wed Jul  1 2020 Jeff Law <law@redhat.com> - 1.2.3.2-3
07b017
- Disable LTO
07b017
07b017
* Mon Jun 29 2020 Jaroslav Kysela <perex@perex.cz> - 1.2.3.2-2
07b017
- update to 1.2.3.2
07b017
07b017
* Thu Jun 18 2020 Jaroslav Kysela <perex@perex.cz> - 1.2.3.1-1
07b017
- update to 1.2.3.1
07b017
07b017
* Sun Jun  7 2020 Jaroslav Kysela <perex@perex.cz> - 1.2.3-8
07b017
- update to 1.2.3
07b017
07b017
* Mon Apr  6 2020 Jaroslav Kysela <perex@perex.cz> - 1.2.2-2
07b017
- UCM2 fixes (RemoveDevice), bug#1786723
07b017
07b017
* Wed Feb 19 2020 Jaroslav Kysela <perex@perex.cz> - 1.2.2-1
07b017
- Updated to 1.2.2
07b017
07b017
* Sun Feb  9 2020 Jaroslav Kysela <perex@perex.cz> - 1.2.1.2-6
07b017
- More UCM2 related fixes
07b017
07b017
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1.2-5
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
07b017
07b017
* Mon Dec  9 2019 Jaroslav Kysela <perex@perex.cz> - 1.2.1.2-4
07b017
- Fixes for sof-hda-dsp UCM2 configuration
07b017
07b017
* Tue Dec  3 2019 Jaroslav Kysela <perex@perex.cz> - 1.2.1.2-3
07b017
- Fixed more UCM2 related issues
07b017
07b017
* Fri Nov 29 2019 Jaroslav Kysela <perex@perex.cz> - 1.2.1.2-1
07b017
- Updated to 1.2.1.2
07b017
07b017
* Tue Nov 19 2019 Jaroslav Kysela <perex@perex.cz> - 1.2.1.1-1
07b017
- Updated to 1.2.1.1
07b017
07b017
* Wed Nov 13 2019 Jaroslav Kysela <perex@perex.cz> - 1.2.1-3
07b017
- Updated to 1.2.1
07b017
07b017
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.9-2
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
07b017
07b017
* Fri May 10 2019 Jaroslav Kysela <perex@perex.cz> - 1.1.9-1
07b017
- Updated to 1.1.9
07b017
07b017
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.8-2
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
07b017
07b017
* Mon Jan  7 2019 Jaroslav Kysela <perex@perex.cz> - 1.1.8-1
07b017
- Updated to 1.1.8
07b017
07b017
* Tue Dec 25 2018 Hans de Goede <hdegoede@redhat.com> - 1.1.7-3
07b017
- Fix broken chtrt5645 UCM profile, fixing mic input on chtrt5645 devices
07b017
07b017
* Wed Oct 24 2018 Jaroslav Kysela <perex@perex.cz> - 1.1.7-2
07b017
- Moved topology files to alsa-topology
07b017
- Updated to 1.1.7
07b017
07b017
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-3
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
07b017
07b017
* Wed Apr 04 2018 Jaroslav Kysela <perex@perex.cz> - 1.1.6-2
07b017
- Changed add-on directory to /etc/alsa/conf.d
07b017
07b017
* Tue Apr 03 2018 Jaroslav Kysela <perex@perex.cz> - 1.1.6-1
07b017
- Updated to 1.1.6
07b017
07b017
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.5-2
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
07b017
07b017
* Tue Nov 14 2017 Jaroslav Kysela <perex@perex.cz> - 1.1.5-1
07b017
- Updated to 1.1.5
07b017
07b017
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.4.1-3
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
07b017
07b017
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.4.1-2
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
07b017
07b017
* Tue Jun 13 2017 Jaroslav Kysela <perex@perex.cz> - 1.1.4.1-1
07b017
- Updated to 1.1.4.1
07b017
07b017
* Fri May 12 2017 Jaroslav Kysela <perex@perex.cz> - 1.1.4-1
07b017
- Updated to 1.1.4
07b017
07b017
* Mon Mar 20 2017 Peter Robinson <pbrobinson@fedoraproject.org> 1.1.3-3
07b017
- Add upstream patch for Raspberry Pi HDMI audio
07b017
07b017
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-2
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
07b017
07b017
* Tue Dec 20 2016 Jaroslav Kysela <perex@perex.cz> - 1.1.3-1
07b017
- Updated to 1.1.3
07b017
07b017
* Tue Aug  2 2016 Jaroslav Kysela <perex@perex.cz> - 1.1.2-1
07b017
- Updated to 1.1.2
07b017
07b017
* Tue Jul 19 2016 Bastien Nocera <bnocera@redhat.com> - 1.1.1-2
07b017
- Add Surface 3 configuration file
07b017
07b017
* Thu Mar 31 2016 Jaroslav Kysela <perex@perex.cz> - 1.1.1-1
07b017
- Updated to 1.1.1
07b017
07b017
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
07b017
07b017
* Mon Nov  9 2015 Jaroslav Kysela <perex@perex.cz> - 1.1.0-3
07b017
- Replaced source files with the alsa-lib v1.1.0 final
07b017
07b017
* Thu Nov  5 2015 Jaroslav Kysela <perex@perex.cz> - 1.1.0-2
07b017
- Replaced source files with the alsa-lib v1.1.0 test2
07b017
07b017
* Tue Oct 27 2015 Jaroslav Kysela <perex@perex.cz> - 1.1.0-1
07b017
- Updated to 1.1.0 test1
07b017
07b017
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.29-2
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
07b017
07b017
* Thu Feb 26 2015 Jaroslav Kysela <perex@perex.cz> - 1.0.29-1
07b017
- Updated to 1.0.29
07b017
07b017
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 1.0.28-4
07b017
- Rebuilt for Fedora 23 Change
07b017
  https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
07b017
07b017
* Tue Feb  3 2015 Peter Robinson <pbrobinson@fedoraproject.org> 1.0.28-3
07b017
- Add UCM sub package
07b017
- Use %%license
07b017
07b017
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.28-2
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
07b017
07b017
* Thu Jul 24 2014 Peter Robinson <pbrobinson@fedoraproject.org> 1.0.28-1
07b017
- Update to 1.0.28
07b017
07b017
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.27.2-3
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
07b017
07b017
* Thu Aug  1 2013 Ville Skyttä <ville.skytta@iki.fi> - 1.0.27.2-2
07b017
- Fix build with unversioned %%{_docdir_fmt}.
07b017
07b017
* Mon Jul 08 2013 Jaroslav Kysela <perex@perex.cz> - 1.0.27.2-1
07b017
- Updated to 1.0.27.2
07b017
07b017
* Thu May 30 2013 Jaroslav Kysela <perex@perex.cz> - 1.0.27.1-2
07b017
- Fixed bug#953352
07b017
07b017
* Tue May 21 2013 Jaroslav Kysela <perex@perex.cz> - 1.0.27.1-1
07b017
- Updated to 1.0.27.1
07b017
07b017
* Tue May 07 2013 Rex Dieter <rdieter@fedoraproject.org> 1.0.27-3
07b017
- pull in upstream fix for building in C90 mode
07b017
07b017
* Thu Apr 11 2013 Jaroslav Kysela <perex@perex.cz> - 1.0.27-2
07b017
- move dist-oss.conf to doc as modprobe-dist-oss.conf
07b017
07b017
* Thu Apr 11 2013 Jaroslav Kysela <perex@perex.cz> - 1.0.27-1
07b017
- Updated to 1.0.27
07b017
07b017
* Wed Apr 03 2013 Stephen Gallagher <sgallagh@redhat.com> - 1.0.26-4
07b017
- Add upstream patch to explicitly include sys/types.h
07b017
07b017
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.26-3
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
07b017
07b017
* Mon Dec  3 2012 Peter Robinson <pbrobinson@fedoraproject.org> 1.0.26-2
07b017
- Create and own ucm directory so alsaucm doesn't crash.
07b017
- Cleanup and modernise spec
07b017
07b017
* Thu Sep  6 2012 Jaroslav Kysela <jkysela@redhat.com> - 1.0.26-1
07b017
- Updated to 1.0.26
07b017
07b017
* Thu Jul 26 2012 Michael Schwendt <mschwendt@fedoraproject.org> - 1.0.25-6
07b017
- Don't package ancient ChangeLog that ends at alsa-lib 0.2.0 (#510212).
07b017
07b017
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-5
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
07b017
07b017
* Wed May  2 2012 Josh Boyer <jwboyer@redhat.com> - 1.0.25-4
07b017
- Install ALSA related module conf files
07b017
07b017
* Wed Feb  1 2012 Jaroslav Kysela <jkysela@redhat.com> - 1.0.25-3
07b017
- Remove the pulse audio configuration from /etc/asound.conf
07b017
07b017
* Sat Jan 28 2012 Jaroslav Kysela <jkysela@redhat.com> - 1.0.25-1
07b017
- Updated to 1.0.25 final
07b017
07b017
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.24-3
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
07b017
07b017
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.24-2
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
07b017
07b017
* Fri Jan 28 2011 Jaroslav Kysela <jkysela@redhat.com> - 1.0.24-1
07b017
- Updated to 1.0.24 final
07b017
07b017
* Tue Nov  9 2010 Jochen Schmitt <Jochen herr-schmitt de> 1.0.23-2
07b017
- Set plugindir to %%{_libdir}/alsa-lib (bz#651507)
07b017
07b017
* Fri Apr 16 2010 Jaroslav Kysela <jkysela@redhat.com> - 1.0.23-1
07b017
- Updated to 1.0.23 final
07b017
07b017
* Mon Dec 28 2009 Jaroslav Kysela <jkysela@redhat.com> - 1.0.22-1
07b017
- Updated to 1.0.22 final
07b017
- Fix file descriptor leak in pcm_hw plugin
07b017
- Fix sound distortions for S24_LE - softvol plugin
07b017
07b017
* Wed Sep  9 2009 Jaroslav Kysela <jkysela@redhat.com> - 1.0.21-3
07b017
- Add Speaker and Beep control names to mixer weight list
07b017
- Fix redhat bug #521988
07b017
07b017
* Wed Sep  2 2009 Jaroslav Kysela <jkysela@redhat.com> - 1.0.21-1
07b017
- Updated to 1.0.21 final
07b017
07b017
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.20-2
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
07b017
07b017
* Wed May  6 2009 Jaroslav Kysela <jkysela@redhat.com> - 1.0.20-1
07b017
- Updated to 1.0.20 final
07b017
07b017
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.19-3
07b017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
07b017
07b017
* Wed Feb  4 2009 Jaroslav Kysela <jkysela@redhat.com> - 1.0.19-2
07b017
- Make doxygen documentation same for all architectures (bz#465205)
07b017
07b017
* Tue Jan 20 2009 Jaroslav Kysela <jkysela@redhat.com> - 1.0.19-1
07b017
- Updated to 1.0.19 final