Blame SPECS/alsa-sof-firmware.spec

418911
# This is a firmware package, so binaries (which are not run on the host)
418911
# in the end package are expected.
418911
%define _binaries_in_noarch_packages_terminate_build   0
418911
%global _firmwarepath  /usr/lib/firmware
418911
a6a07d
%global sof_ver 2.2.4
418911
#global sof_ver_pre rc2
418911
%global sof_ver_rel %{?sof_ver_pre:.%{sof_ver_pre}}
418911
%global sof_ver_pkg v%{sof_ver}%{?sof_ver_pre:-%{sof_ver_pre}}
418911
a6a07d
%global with_sof_addon 0
a6a07d
%global sof_ver_addon 0
dbfb66
418911
%global tplg_version 1.2.4
418911
418911
Summary:        Firmware and topology files for Sound Open Firmware project
418911
Name:           alsa-sof-firmware
418911
Version:        %{sof_ver}
dbfb66
Release:        1%{?sof_ver_rel}%{?dist}
418911
# See later in the spec for a breakdown of licensing
418911
License:        BSD
418911
URL:            https://github.com/thesofproject/sof-bin
418911
Source:         https://github.com/thesofproject/sof-bin/releases/download/%{sof_ver_pkg}/sof-bin-%{sof_ver_pkg}.tar.gz
dbfb66
%if 0%{?with_sof_addon}
dbfb66
Source2:        https://github.com/thesofproject/sof-bin/releases/download/v%{sof_ver_addon}/sof-tplg-v%{sof_ver_addon}.tar.gz
dbfb66
%endif
418911
BuildRequires:  alsa-topology >= %{tplg_version}
418911
BuildRequires:  alsa-topology-utils >= %{tplg_version}
418911
418911
# noarch, since the package is firmware
418911
BuildArch:      noarch
418911
418911
%description
418911
This package contains the firmware binaries for the Sound Open Firmware project.
418911
418911
%package debug
418911
Requires:       alsa-sof-firmware
418911
Summary:        Debug files for Sound Open Firmware project
418911
License:        BSD
418911
418911
%description debug
418911
This package contains the debug files for the Sound Open Firmware project.
418911
418911
%prep
418911
%autosetup -n sof-bin-%{sof_ver_pkg}
418911
418911
mkdir -p firmware/intel/sof
418911
418911
# we have the version in the package name
418911
mv sof-%{sof_ver_pkg}/* firmware/intel/sof
418911
418911
# move topology files
418911
mv sof-tplg-%{sof_ver_pkg} firmware/intel/sof-tplg
418911
dbfb66
%if 0%{?with_sof_addon}
dbfb66
tar xvzf %{SOURCE2}
dbfb66
mv sof-tplg-v%{sof_ver_addon}/*.tplg firmware/intel/sof-tplg
dbfb66
%endif
dbfb66
418911
# remove NXP firmware files
418911
rm LICENCE.NXP
418911
rm -rf firmware/intel/sof-tplg/sof-imx8*
418911
418911
# remove Mediatek firmware files
418911
rm -rf firmware/intel/sof-tplg/sof-mt8*
418911
418911
%build
418911
# SST topology files (not SOF related, but it's a Intel hw support
418911
# and this package seems a good place to distribute them
418911
alsatplg -c /usr/share/alsa/topology/hda-dsp/skl_hda_dsp_generic-tplg.conf \
418911
         -o firmware/skl_hda_dsp_generic-tplg.bin
418911
418911
%install
418911
mkdir -p %{buildroot}%{_firmwarepath}
418911
cp -ra firmware/* %{buildroot}%{_firmwarepath}
418911
418911
# gather files and directories
418911
FILEDIR=$(pwd)
418911
pushd %{buildroot}/%{_firmwarepath}
418911
find -P . -name "*.ri" | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.files
418911
#find -P . -name "*.tplg" | sed -e '/^.$/d' >> $FILEDIR/alsa-sof-firmware.files
418911
find -P . -name "*.ldc" | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.debug-files
418911
find -P . -type d | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.dirs
418911
popd
418911
sed -i -e 's:^./::' alsa-sof-firmware.{files,debug-files,dirs}
418911
sed -i -e 's!^!/usr/lib/firmware/!' alsa-sof-firmware.{files,debug-files,dirs}
418911
sed -e 's/^/%%dir /' alsa-sof-firmware.dirs >> alsa-sof-firmware.files
418911
cat alsa-sof-firmware.files
418911
418911
%files -f alsa-sof-firmware.files
418911
%license LICENCE*
418911
%doc README*
418911
%dir %{_firmwarepath}
418911
418911
# Licence: 3-clause BSD
418911
%{_firmwarepath}/*.bin
418911
418911
# Licence: 3-clause BSD
418911
# .. for files with suffix .tplg
418911
%{_firmwarepath}/intel/sof-tplg
418911
418911
# Licence: SOF (3-clause BSD plus others)
418911
# .. for files with suffix .ri
418911
418911
%files debug -f alsa-sof-firmware.debug-files
418911
418911
%pretrans -p <lua>
418911
path = "%{_firmwarepath}/intel/sof-tplg"
418911
st = posix.stat(path)
418911
if st and st.type == "link" then
418911
  os.remove(path)
418911
end
418911
418911
%changelog
a6a07d
* Mon Jan  9 2023 Jaroslav Kysela <perex@perex.cz> - 2.2.4-1
a6a07d
- Update to v2.2.4
a6a07d
a6a07d
* Wed Dec  7 2022 Jaroslav Kysela <perex@perex.cz> - 2.2.3-1
a6a07d
- Update to v2.2.3
a6a07d
a6a07d
* Thu Sep 29 2022 Jaroslav Kysela <perex@perex.cz> - 2.2.2-1
a6a07d
- Update to v2.2.2
a6a07d
dbfb66
* Mon Jun 20 2022 Jaroslav Kysela <perex@perex.cz> - 2.1.1-1
dbfb66
- Update to v2.1.1 + v2.1.1a (topology)
dbfb66
418911
* Mon Dec 20 2021 Jaroslav Kysela <perex@perex.cz> - 1.9.3-2
418911
- Update to v1.9.3
418911
418911
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.8-2
418911
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
418911
  Related: rhbz#1991688
418911
418911
* Thu Jul 22 2021 Jaroslav Kysela <perex@perex.cz> - 1.8-1
418911
- Update to v1.8
418911
418911
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1.6.1-5
418911
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
418911
418911
* Thu Mar 11 2021 Jaroslav Kysela <perex@perex.cz> - 1.6.1-4
418911
- Add SST Skylake HDA topology binary (bug#1933423)
418911
418911
* Fri Mar  5 2021 Jaroslav Kysela <perex@perex.cz> - 1.6.1-3
418911
- Add TGL-H firmware files
418911
418911
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.1-2
418911
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
418911
418911
* Sun Jan  3 2021 Jaroslav Kysela <perex@perex.cz> - 1.6.1-1
418911
- Update to v1.6.1
418911
418911
* Thu Dec 10 2020 Jaroslav Kysela <perex@perex.cz> - 1.6-4
418911
- Update to v1.6 (Dec 9)
418911
418911
* Thu Nov 19 2020 Jaroslav Kysela <perex@perex.cz> - 1.6-3
418911
- Update to v1.6 (Nov 19)
418911
418911
* Wed Oct 14 2020 Jaroslav Kysela <perex@perex.cz> - 1.6-1
418911
- Update to v1.6 (Oct 13)
418911
418911
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-2
418911
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
418911
418911
* Mon Jun  1 2020 Jaroslav Kysela <perex@perex.cz> - 1.5-1
418911
- Update to v1.5
418911
418911
* Tue May 12 2020 Jaroslav Kysela <perex@perex.cz> - 1.4.2-6
418911
- Fix the upgrade (make /usr/lib/firmware/intel/sof-tplg directory again)
418911
- Remove the version from all paths
418911
418911
* Thu Apr 30 2020 Jaroslav Kysela <perex@perex.cz> - 1.4.2-5
418911
- Add missing symlink for sof-cfl.ri
418911
418911
* Thu Mar 12 2020 Jaroslav Kysela <perex@perex.cz> - 1.4.2-4
418911
- Add missing symlink for sof-cml.ri
418911
418911
* Mon Mar  2 2020 Jaroslav Kysela <perex@perex.cz> - 1.4.2-3
418911
- Initial version, SOF firmware 1.4.2