Blame SPECS/alsa-sof-firmware.spec

55e321
# This is a firmware package, so binaries (which are not run on the host)
55e321
# in the end package are expected.
55e321
%define _binaries_in_noarch_packages_terminate_build   0
55e321
%global _firmwarepath  /usr/lib/firmware
55e321
618e50
%global sof_ver 1.8
618e50
#global sof_ver_pre rc2
618e50
%global sof_ver_rel %{?sof_ver_pre:.%{sof_ver_pre}}
618e50
%global sof_ver_pkg v%{sof_ver}%{?sof_ver_pre:-%{sof_ver_pre}}
55e321
618e50
%global tplg_version 1.2.4
55e321
55e321
Summary:        Firmware and topology files for Sound Open Firmware project
55e321
Name:           alsa-sof-firmware
618e50
Version:        %{sof_ver}
618e50
Release:        1%{?sof_ver_rel}%{?dist}
55e321
# See later in the spec for a breakdown of licensing
55e321
License:        BSD
55e321
URL:            https://github.com/thesofproject/sof-bin
618e50
Source:         https://github.com/thesofproject/sof-bin/releases/download/%{sof_ver_pkg}/sof-bin-%{sof_ver_pkg}.tar.gz
618e50
BuildRequires:  alsa-topology >= %{tplg_version}
618e50
BuildRequires:  alsa-topology-utils >= %{tplg_version}
55e321
55e321
# noarch, since the package is firmware
55e321
BuildArch:      noarch
55e321
55e321
%description
55e321
This package contains the firmware binaries for the Sound Open Firmware project.
55e321
55e321
%package debug
55e321
Requires:       alsa-sof-firmware
55e321
Summary:        Debug files for Sound Open Firmware project
55e321
License:        BSD
55e321
55e321
%description debug
55e321
This package contains the debug files for the Sound Open Firmware project.
55e321
55e321
%prep
618e50
%autosetup -n sof-bin-%{sof_ver_pkg}
55e321
618e50
mkdir -p firmware/intel/sof
55e321
55e321
# we have the version in the package name
618e50
mv sof-%{sof_ver_pkg}/* firmware/intel/sof
55e321
55e321
# move topology files
618e50
mv sof-tplg-%{sof_ver_pkg} firmware/intel/sof-tplg
55e321
55e321
# remove NXP firmware files
618e50
rm LICENCE.NXP
618e50
rm -rf firmware/intel/sof-tplg/sof-imx8*
55e321
55e321
%build
618e50
# SST topology files (not SOF related, but it's a Intel hw support
618e50
# and this package seems a good place to distribute them
618e50
alsatplg -c /usr/share/alsa/topology/hda-dsp/skl_hda_dsp_generic-tplg.conf \
618e50
         -o firmware/skl_hda_dsp_generic-tplg.bin
55e321
55e321
%install
55e321
mkdir -p %{buildroot}%{_firmwarepath}
618e50
cp -ra firmware/* %{buildroot}%{_firmwarepath}
55e321
55e321
# gather files and directories
55e321
FILEDIR=$(pwd)
55e321
pushd %{buildroot}/%{_firmwarepath}
55e321
find -P . -name "*.ri" | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.files
55e321
#find -P . -name "*.tplg" | sed -e '/^.$/d' >> $FILEDIR/alsa-sof-firmware.files
55e321
find -P . -name "*.ldc" | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.debug-files
55e321
find -P . -type d | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.dirs
55e321
popd
55e321
sed -i -e 's:^./::' alsa-sof-firmware.{files,debug-files,dirs}
55e321
sed -i -e 's!^!/usr/lib/firmware/!' alsa-sof-firmware.{files,debug-files,dirs}
55e321
sed -e 's/^/%%dir /' alsa-sof-firmware.dirs >> alsa-sof-firmware.files
55e321
cat alsa-sof-firmware.files
55e321
55e321
%files -f alsa-sof-firmware.files
55e321
%license LICENCE*
55e321
%doc README*
55e321
%dir %{_firmwarepath}
55e321
55e321
# Licence: 3-clause BSD
618e50
%{_firmwarepath}/*.bin
618e50
618e50
# Licence: 3-clause BSD
55e321
# .. for files with suffix .tplg
55e321
%{_firmwarepath}/intel/sof-tplg
55e321
55e321
# Licence: SOF (3-clause BSD plus others)
55e321
# .. for files with suffix .ri
55e321
55e321
%files debug -f alsa-sof-firmware.debug-files
55e321
55e321
%changelog
618e50
* Thu Jul 22 2021 Jaroslav Kysela <perex@perex.cz> - 1.8-1
618e50
- Update to v1.8
618e50
- Add SST Skylake HDA topology binary
618e50
cc8acf
* Sun Jan  3 2021 Jaroslav Kysela <perex@perex.cz> - 1.6.1-1
cc8acf
- Update to v1.6.1
cc8acf
cc8acf
* Thu Dec 10 2020 Jaroslav Kysela <perex@perex.cz> - 1.6-2
cc8acf
- Update to v1.6 (Dec 9)
cc8acf
cc8acf
* Wed Nov 11 2020 Jaroslav Kysela <perex@perex.cz> - 1.6-1
cc8acf
- Update to v1.6 (Oct 13)
cc8acf
55e321
* Mon Jun  8 2020 Jaroslav Kysela <perex@perex.cz> - 1.5-2
55e321
- Update to v1.5
55e321
55e321
* Tue Apr 21 2020 Jaroslav Kysela <perex@perex.cz> - 1.4.2-2
55e321
- Initial version (Open Sound Firmware v1.4.2)