alsa-sof-firmware/alsa-sof-firmware.spec

97 lines
2.9 KiB
RPMSpec

#%global sof_commit 72a04d57d04c2df6e9dbf4eba0a98f40c252ee0b
Name: alsa-sof-firmware
Version: 1.8
Release: 2mamba
Summary: Firmware and topology files for Sound Open Firmware project
Group: System/Kernel and Hardware
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/thesofproject/sof-bin
Source: https://github.com/thesofproject/sof-bin.git/v%{version}/sof-bin-%{version}.tar.bz2
Source1: https://github.com/thesofproject/sof.git/v%{version}/sof-%{version}.tar.bz2
License: BSD
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libalsa-devel
## AUTOBUILDREQ-END
%description
Firmware and topology files for Sound Open Firmware project.
%prep
%setup -q -n sof-bin-%{version} -a1
## add missing symlink
#ln -s v1.4.2/intel-signed/sof-cnl-v1.4.2.ri lib/firmware/intel/sof/sof-cml.ri
%build
%ifarch x86_64 aarch64
cd sof-%{version}/tools
%cmake -d build
%make
%endif
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -d -m0755 %{buildroot}/lib/firmware/intel
install -d -m0755 %{buildroot}/%{_bindir}
FW_DEST=%{buildroot}/lib/firmware/intel TOOLS_DEST=%{buildroot}%{_bindir} ./install.sh v%{version}.x/v%{version}
# Remove prebuilt binaries
rm -f %{buildroot}%{_bindir}/*
# Workaround for update from previous version where sof is a directory but now it is a symlink
rm -f %{buildroot}/lib/firmware/intel/sof
%ifarch x86_64 aarch64
%makeinstall -C sof-%{version}/tools/build
%endif
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
# script to replace sof direcotory with symlink
%posttrans
[ -L /lib/firmware/intel/sof ] || ln -s sof-tplg-v%{version} /lib/firmware/intel/sof
:
%files
%defattr(-,root,root)
%ifarch x86_64 aarch64
%{_bindir}/sof-ctl
%{_bindir}/sof-logger
%{_bindir}/sof-probes
%endif
#/lib/firmware/intel/sof
/lib/firmware/intel/sof-tplg
%dir /lib/firmware/intel/sof-tplg-v%{version}
/lib/firmware/intel/sof-tplg-v%{version}/sof-*.tplg
%dir /lib/firmware/intel/sof-v%{version}
%dir /lib/firmware/intel/sof-v%{version}/community
/lib/firmware/intel/sof-v%{version}/community/sof-*.ri
%dir /lib/firmware/intel/sof-v%{version}/intel-signed
/lib/firmware/intel/sof-v%{version}/intel-signed/*.ri
/lib/firmware/intel/sof-v%{version}/sof-*.ldc
/lib/firmware/intel/sof-v%{version}/sof-*.ri
%doc LICENCE.Intel
%changelog
* Fri Jun 25 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 1.8-2mamba
- remove x86_64 only prebuilt binaries
* Wed Jun 23 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 1.8-1mamba
- update to 1.8
* Thu Feb 04 2021 Automatic Build System <autodist@mambasoft.it> 1.6.1-1mamba
- automatic version update by autodist
* Sat Nov 14 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 1.6-1mamba
- update to 1.6
* Wed Apr 08 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 1.4.2-1mamba
- package created using the webbuild interface