Blame SPECS/alsa-sof-firmware.spec

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