diff --git a/linux-firmware.spec b/linux-firmware.spec index b783cb9d215f566fbc3f0abc92a9a3c9cd1b5f32..e3538fe1b655b5bfadde0253d21cb30f32d9c33a 100644 --- a/linux-firmware.spec +++ b/linux-firmware.spec @@ -3,6 +3,7 @@ %global release 2 %global _lib_path /usr/lib/firmware %global _license_path /usr/share/licenses +%global _firmwarepath usr/lib/firmware Name: linux-firmware Version: 20230117 @@ -128,11 +129,58 @@ rm -f Makefile README configure rm -rf check_whence.py copy-firmware.sh %install -mkdir -p %{buildroot}/%{_lib_path} -mkdir -p %{buildroot}/%{_license_path} -cp -r * %{buildroot}/%{_lib_path} -cp -r WHENCE LICENCE.* %{buildroot}/%{_license_path} -rm %{buildroot}/%{_lib_path}/{WHENCE,LICENCE.*,LICENSE.*} + +mkdir -p $RPM_BUILD_ROOT/%{_firmwarepath} +mkdir -p $RPM_BUILD_ROOT/%{_firmwarepath}/updates + +make DESTDIR=%{buildroot}/ FIRMWAREDIR=/%{_firmwarepath} install + +pushd $RPM_BUILD_ROOT/%{_firmwarepath} +# Remove firmware shipped in separate packages already +# Perhaps these should be built as subpackages of linux-firmware? +rm -rf ess korg sb16 yamaha + +# Remove source files we don't need to install +rm -f usbdux/*dux */*.asm +rm -rf carl9170fw + +# No need to install old firmware versions where we also provide newer versions +# which are preferred and support the same (or more) hardware +rm -f libertas/sd8686_v8* +rm -f libertas/usb8388_v5.bin + +# Remove firmware for Creative CA0132 HD as it's in alsa-firmware +rm -f ctefx.bin ctspeq.bin + +# Remove cxgb3 (T3 adapter) firmware (see bug 1503721) +rm -rf cxgb3 + +# Remove obsolete and password-protected vgxe firmware (see bug 2108051) +rm -rf vxge + +# Remove superfluous infra files +rm -f check_whence.py configure Makefile README + +popd + +# Create file list but exclude firmwares that we place in subpackages +# and netronome/nic_AMDA* symlinks +FILEDIR=`pwd` +pushd $RPM_BUILD_ROOT/%{_firmwarepath} +find . \! -type d > $FILEDIR/linux-firmware.files +find . -type d | sed -e '/^.$/d' > $FILEDIR/linux-firmware.dirs +popd +sed -i -e 's:^./::' linux-firmware.{files,dirs} +sed -i -e '/^iwlwifi/d' \ + -i -e '/^libertas\/sd8686/d' \ + -i -e '/^libertas\/usb8388/d' \ + -i -e '/^mrvl\/sd8787/d' \ + -i -e '/^netronome\/nic_AMDA/d' \ + linux-firmware.files +sed -i -e 's!^!/usr/lib/firmware/!' linux-firmware.{files,dirs} +sed -i -e 's/^/"/;s/$/"/' linux-firmware.files +sed -e 's/^/%%dir /' linux-firmware.dirs >> linux-firmware.files + %files %dir %{_lib_path} @@ -175,6 +223,9 @@ rm %{buildroot}/%{_lib_path}/{WHENCE,LICENCE.*,LICENSE.*} %changelog +* Fri May 26 2023 kiritakekumi - 20230117-2 +- Fix intel ice ddp package + * Fri Feb 10 2023 Liu Yuntao - 20230117-2 - remove useless patch definition