From 2a3b5724096abc3b59f09ab444f52a6f652e4c59 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 06:18:39 +0100 Subject: [PATCH] integrate extra subpackage to make a single package [release 20150904.6ebf5d5-2mamba;Tue Dec 22 2015] --- README.md | 1 - linux-firmware.spec | 182 +++++++++++++++----------------------------- 2 files changed, 60 insertions(+), 123 deletions(-) diff --git a/README.md b/README.md index b8274f2..ff63805 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ # linux-firmware Collection of firmware files used by the Linux Kernel. - diff --git a/linux-firmware.spec b/linux-firmware.spec index 3afc82e..708a58c 100644 --- a/linux-firmware.spec +++ b/linux-firmware.spec @@ -32,7 +32,7 @@ Name: linux-firmware Version: 20150904.6ebf5d5 -Release: 1mamba +Release: 2mamba Summary: Collection of firmware files used by the Linux Kernel Group: System/Kernel and Hardware Vendor: openmamba @@ -47,13 +47,13 @@ Source: git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firm License: Distributable ## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-END -BuildRequires: kernel-%{KERNEL_TARGET} >= %{kernel_majversion} -BuildRequires: kernel-%{KERNEL_TARGET} <= %{kernel_majversion}.255 -BuildRequires: kernel-%{KERNEL_TARGET}-sound >= %{kernel_majversion} -BuildRequires: kernel-%{KERNEL_TARGET}-sound <= %{kernel_majversion}.255 -BuildRequires: kernel-%{KERNEL_TARGET}-wireless >= %{kernel_majversion} -BuildRequires: kernel-%{KERNEL_TARGET}-wireless <= %{kernel_majversion}.255 -BuildRequires: kmod +#BuildRequires: kernel-%{KERNEL_TARGET} >= %{kernel_majversion} +#BuildRequires: kernel-%{KERNEL_TARGET} <= %{kernel_majversion}.255 +#BuildRequires: kernel-%{KERNEL_TARGET}-sound >= %{kernel_majversion} +#BuildRequires: kernel-%{KERNEL_TARGET}-sound <= %{kernel_majversion}.255 +#BuildRequires: kernel-%{KERNEL_TARGET}-wireless >= %{kernel_majversion} +#BuildRequires: kernel-%{KERNEL_TARGET}-wireless <= %{kernel_majversion}.255 +#BuildRequires: kmod Provides: iwlwifi-firmware Obsoletes: iwlwifi-firmware Provides: rt2860-firmware @@ -65,146 +65,84 @@ Obsoletes: radeon-firmware Provides: rt2501-firmware Obsoletes: rt2501-firmware Provides: linux_firmware +Provides: linux-firmware-extra +Obsoletes: linux-firmware-extra BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Collection of firmware files used by the Linux Kernel. -%package extra -Summary: Collection of extra firmware files that are not used by the Linux Kernel modules -Group: System/Kernel and Hardware -Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} - -%description extra -Collection of extra firmware files that are not used by the Linux Kernel modules. +#%package extra +#Summary: Collection of extra firmware files that are not used by the Linux Kernel modules +#Group: System/Kernel and Hardware +#Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} +# +#%description extra +#Collection of extra firmware files that are not used by the Linux Kernel modules. %prep %setup -q -[ -e /lib/modules/%{KERNEL_VER}%{KERNEL_TARGET}/modules.order ] || { - echo "ERROR: missing a file that indicates that kernel version here is wrong; aborting." - exit 1 -} +#[ -e /lib/modules/%{KERNEL_VER}%{KERNEL_TARGET}/modules.order ] || { +# echo "ERROR: missing a file that indicates that kernel version here is wrong; aborting." +# exit 1 +#} %build %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" -install -d -m0755 %{buildroot}/lib/firmware -cp -a * %{buildroot}/lib/firmware/ +%makeinstall +#install -d -m0755 %{buildroot}/lib/firmware +#cp -a * %{buildroot}/lib/firmware/ -find /lib/modules/%{KERNEL_VER}%{KERNEL_TARGET}/ -type f -name *.ko | \ -while read l; do - /sbin/modinfo $l | grep ^firmware: | sed "s|firmware:[[:space:]]*|/lib/firmware/|" >> extracted-kernel-firmware.list -done +#find /lib/modules/%{KERNEL_VER}%{KERNEL_TARGET}/ -type f -name *.ko | \ +#while read l; do +# /sbin/modinfo $l | grep ^firmware: | sed "s|firmware:[[:space:]]*|/lib/firmware/|" >> extracted-kernel-firmware.list +#done -cat extracted-kernel-firmware.list | sort -u > kernel-firmware.list -while read l; do - [ -e %{buildroot}${l} ] && echo "${l}" >> matching-firmware.list -done < kernel-firmware.list +#cat extracted-kernel-firmware.list | sort -u > kernel-firmware.list +#while read l; do +# [ -e %{buildroot}${l} ] && echo "${l}" >> matching-firmware.list +#done < kernel-firmware.list -pushd %{buildroot}/lib/firmware -# atk3k-1.fw needs microcode files in /lib/firmware/ar3k -grep "ath3k-1.fw" %{_builddir}/%{name}-%{version}/matching-firmware.list && { - find ar3k/ -type f | \ - while read l; do - [ -e %{buildroot}/lib/firmware/${l} ] && echo "/lib/firmware/${l}" >> %{_builddir}/%{name}-%{version}/matching-firmware.list - done -} +#pushd %{buildroot}/lib/firmware +## atk3k-1.fw needs microcode files in /lib/firmware/ar3k +#grep "ath3k-1.fw" %{_builddir}/%{name}-%{version}/matching-firmware.list && { +# find ar3k/ -type f | \ +# while read l; do +# [ -e %{buildroot}/lib/firmware/${l} ] && echo "/lib/firmware/${l}" >> %{_builddir}/%{name}-%{version}/matching-firmware.list +# done +#} -# add symlinked files -find -type l -exec readlink -f {} \; | \ - while read l; do - n=`echo "${l/*\/lib\/firmware\/}"` - grep ${n} %{_builddir}/%{name}-%{version}/matching-firmware.list || \ - echo "/lib/firmware/${n}" >> %{_builddir}/%{name}-%{version}/matching-firmware.list - done -popd +## add symlinked files +#find -type l -exec readlink -f {} \; | \ +# while read l; do +# n=`echo "${l/*\/lib\/firmware\/}"` +# grep ${n} %{_builddir}/%{name}-%{version}/matching-firmware.list || \ +# echo "/lib/firmware/${n}" >> %{_builddir}/%{name}-%{version}/matching-firmware.list +# done +#popd -find %{buildroot}/lib/firmware/ \( -type f -or -type l \) -and \ - -not -name LICENSE\* -and -not -name LICENCE\* -and -not -name GPL-3 | \ -while read l; do - f=`echo $l | sed "s|%{buildroot}||"` - grep "^$f$" matching-firmware.list || echo "${f}" >> not-matching-firmware.list -done +#find %{buildroot}/lib/firmware/ \( -type f -or -type l \) -and \ +# -not -name LICENSE\* -and -not -name LICENCE\* -and -not -name GPL-3 | \ +#while read l; do +# f=`echo $l | sed "s|%{buildroot}||"` +# grep "^$f$" matching-firmware.list || echo "${f}" >> not-matching-firmware.list +#done %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" -%files -f matching-firmware.list +%files %defattr(-,root,root) -/lib/firmware/iwlwifi-6000g2b-5.ucode -/lib/firmware/GPL-3 -/lib/firmware/LICENCE.agere -/lib/firmware/LICENSE.amd-ucode -/lib/firmware/LICENCE.atheros_firmware -/lib/firmware/LICENCE.cw1200 -/lib/firmware/LICENCE.go7007 -/lib/firmware/LICENCE.i2400m -/lib/firmware/LICENCE.it913x -/lib/firmware/LICENCE.it913x -/lib/firmware/LICENCE.it913x -/lib/firmware/LICENCE.iwlwifi_firmware -/lib/firmware/LICENCE.mwl8335 -/lib/firmware/LICENCE.myri10ge_firmware -/lib/firmware/LICENCE.phanfw -/lib/firmware/LICENCE.qat_dh895xcc_firmware -/lib/firmware/LICENCE.qla2xxx -/lib/firmware/LICENCE.ralink-firmware.txt -/lib/firmware/LICENCE.rtlwifi_firmware.txt -/lib/firmware/LICENCE.ti-connectivity -/lib/firmware/LICENCE.xc5000 -/lib/firmware/LICENCE.xc5000c -/lib/firmware/LICENSE.radeon -/lib/firmware/LICENCE.xc5000 -/lib/firmware/LICENCE.xc5000c -/lib/firmware/LICENCE.Abilis -/lib/firmware/LICENCE.wl1251 -/lib/firmware/LICENCE.xc5000 -/lib/firmware/LICENCE.xc5000c -/lib/firmware/LICENCE.ca0132 -/lib/firmware/LICENCE.nvidia -/lib/firmware/LICENSE.QualcommAtheros_ar3k -/lib/firmware/LICENSE.QualcommAtheros_ath10k - -/lib/firmware/LICENCE.adsp_sst -/lib/firmware/LICENCE.cavium -/lib/firmware/LICENCE.e100 -/lib/firmware/LICENCE.kaweth -/lib/firmware/LICENCE.qat_mmp_firmware -/lib/firmware/LICENCE.qla1280 -/lib/firmware/LICENCE.ti-keystone -/lib/firmware/LICENSE.amdgpu -/lib/firmware/LICENSE.atmel -/lib/firmware/LICENSE.hfi1_firmware -/lib/firmware/LICENSE.i915 -/lib/firmware/LICENCE.fw_sst_0f28 -/lib/firmware/LICENCE.ibt_firmware - -%files extra -f not-matching-firmware.list -%defattr(-,root,root) -%exclude /lib/firmware/iwlwifi-6000g2b-5.ucode -/lib/firmware/LICENSE.dib0700 -/lib/firmware/LICENCE.Marvell -/lib/firmware/LICENCE.fw_sst_0f28 -/lib/firmware/LICENCE.ibt_firmware -/lib/firmware/LICENCE.OLPC -/lib/firmware/LICENCE.broadcom_bcm43xx -/lib/firmware/LICENCE.chelsio_firmware -/lib/firmware/LICENSE.dib0700 -/lib/firmware/LICENCE.ene_firmware -/lib/firmware/LICENCE.fw_sst_0f28 -/lib/firmware/LICENCE.ibt_firmware -/lib/firmware/LICENCE.IntcSST2 -/lib/firmware/LICENCE.ralink_a_mediatek_company_firmware -/lib/firmware/LICENCE.siano -/lib/firmware/LICENCE.tda7706-firmware.txt -/lib/firmware/LICENCE.ueagle-atm4-firmware -/lib/firmware/LICENCE.via_vt6656 -/lib/firmware/LICENCE.r8a779x_usb3 -/lib/firmware/LICENCE.xc4000 +%dir /lib/firmware +/lib/firmware/* %changelog +* Tue Dec 22 2015 Silvan Calarco 20150904.6ebf5d5-2mamba +- integrate extra subpackage to make a single package + * Tue Nov 24 2015 Automatic Build System 20150904.6ebf5d5-1mamba - automatic version update by autodist