kernel-firmware/kernel-firmware.spec.in

153 lines
4.6 KiB
RPMSpec
Raw Normal View History

#
# spec file for package kernel-firmware
#
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
%define __ksyms_path ^/lib/firmware
%define version_unconverted @@VERSION@@
Name: kernel-firmware
Version: @@VERSION@@
Release: 0
Summary: Linux kernel firmware files
License: SUSE-Firmware AND GPL-2.0-only AND GPL-2.0-or-later AND MIT
Group: System/Kernel
URL: https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/
# Created with umask 022; cd /_tmp
# After git clone https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
# cd linux-firmware
# git archive --format=tar --prefix=kernel-firmware-$version/ -v master ./ | xz -9 -M 4G --check=crc32 -T 4 > /tmp/kernel-firmware-$version.tar.xz
#
Source0: kernel-firmware-%{version}.tar.xz
Source1: extrawhence
Source2: ast_dp501_fw.bin
Source8: ql2600_fw.bin
Source9: ql2700_fw.bin
Source10: ql8300_fw.bin
Source99: %{name}-rpmlintrc
# install / build infrastructure
Source1001: install-split.sh
Source1002: list-license.sh
Source1003: get_supplements.sh
Source1004: topics.list
Source1005: licenses.list
Source1006: aliases.list
Source1007: topicdefs
Source1008: topicprovs
Source1009: kernel-firmware.spec.in
Source1010: makespec.sh
Source1011: fwtopics.py
Source1012: check-topic.py
Source1013: update-aliases.py
Source1014: README.build
BuildRequires: fdupes
BuildRequires: suse-module-tools
Requires(post): /usr/bin/mkdir /usr/bin/touch
Requires(postun): /usr/bin/mkdir /usr/bin/touch
BuildArch: noarch
@@ALLPROVS@@
Provides: compat-wireless-firmware = 4.4
Obsoletes: compat-wireless-firmware < 4.4
%description
This package contains the raw uncompressed firmware files for Linux kernel
drivers. This package is provided only for compatibility with older kernels
that do not support the compressed format.
%package -n ucode-amd
Summary: Microcode updates for AMD CPUs
Group: System/Kernel
Requires(post): /usr/bin/mkdir /usr/bin/touch
Requires(postun): /usr/bin/mkdir /usr/bin/touch
# new style (after 3.12 kernel somewhen)
Supplements: modalias(cpu:type%%3Ax86*ven0002*)
# old style (before 3.16 kernel)
Supplements: modalias(x86cpu:vendor%%3A0002%%3Afamily%%3A*%%3Amodel%%3A*%%3Afeature%%3A*)
%description -n ucode-amd
This package contains the microcode files used by AMD CPUs.
%package all
Summary: Compatibility metapackage for kernel firmware files
Group: System/Kernel
Requires(post): /usr/bin/mkdir /usr/bin/touch
Requires(postun): /usr/bin/mkdir /usr/bin/touch
Requires(post): dracut >= 049
Provides: kernel-firmware = %{version}
Obsoletes: kernel-firmware <= %{version}
Conflicts: kernel < 5.3
Provides: compat-wireless-firmware = 4.4
Obsoletes: compat-wireless-firmware < 4.4
@@SUBPKGLIST@@
%description all
This package is a catch-all compatibility metapackage for providing
all files that have been provided by kernel-firmware package.
@@SUBPACKAGES@@
%prep
%setup -q
# additional firmwares
cat %{SOURCE1} >> WHENCE
cp %{SOURCE2} %{SOURCE8} %{SOURCE9} %{SOURCE10} .
%build
# nothing to do
%install
mkdir -p %{buildroot}/lib/firmware
%if "%flavor" != "compressed"
Accepting request 724951 from home:tiwai:branches:Kernel:HEAD - Update to version 20190815 (git-commit 07b925b450bf): * Install only listed firmware files * rtw88: add a README file * rtw88: RTL8822C: add WoW firmware v7.3 * rtw88: RTL8822C: update rtw8822c_fw.bin to v7.3 * ath10k: QCA9984 hw1.0: update board-2.bin * ath10k: QCA9984 hw1.0: update firmware-5.bin to 10.4-3.9.0.2-00046 * ath10k: QCA988X hw2.0: update firmware-5.bin to 10.2.4-1.0-00045 * ath10k: QCA9888 hw2.0: update board-2.bin * ath10k: QCA9888 hw2.0: update firmware-5.bin to 10.4-3.9.0.2-00040 * ath10k: QCA9887 hw1.0: update firmware-5.bin to 10.2.4-1.0-00045 * ath10k: QCA6174 hw3.0: update firmware-6.bin to WLAN.RM.4.4.1-00140-QCARMSWPZ-1 * ath10k: QCA4019 hw1.0: update board-2.bin * cxgb4: update firmware to revision 1.24.3.0 * nfp: update Agilio SmartNIC flower firmware to rev AOTC-2.10.A.38 * nvidia: add missing entries in WHENCE * linux-firmware: Update NXP Management Complex firmware to version 10.16.2 * iwlwifi: update -48 FWs for Qu and cc * iwlwifi: update FWs for 3168, 7265D, 9000, 9260, 8000, 8265 and cc * drm/i915/firmware: Add v33 of GuC for ICL * drm/i915/firmware: Add v33 of GuC for KBL * drm/i915/firmware: Add v33 of GuC for SKL * drm/i915/firmware: Add v33 of GuC for GLK * drm/i915/firmware: Add v33 of GuC for BXT - Drop iwlwifi revert patch, as the fix will go into 5.2.x kernel (bsc#1142128): WHENCE-iwlwifi-9xxx-46-revert.patch - Drop the deprecated upstream fix: 0001-nvidia-add-missing-entries-in-WHENCE.patch - Drop the local copy of copy-file.sh that is already included in OBS-URL: https://build.opensuse.org/request/show/724951 OBS-URL: https://build.opensuse.org/package/show/Kernel:HEAD/kernel-firmware?expand=0&rev=269
2019-08-21 09:50:46 +02:00
sh ./copy-firmware.sh %{buildroot}/lib/firmware
%else
sh %{_sourcedir}/install-split.sh %{_sourcedir}/topics.list %{buildroot} < WHENCE
sh %{_sourcedir}/list-license.sh < %{_sourcedir}/licenses.list
%endif
%fdupes %{buildroot}
%if "%flavor" != "compressed"
@@POST@@
@@POST@@ -n ucode-amd
%else
@@POST@@ all
@@SUBPKGPOSTS@@
%endif
%if "%flavor" != "compressed"
%files
%doc WHENCE README
%license GPL-2 GPL-3 LICEN[CS]E.*
/lib/firmware
%exclude /lib/firmware/amd-ucode
%exclude /lib/firmware/amd-ucode/*
%files -n ucode-amd
%license LICENSE.amd-ucode
%dir /lib/firmware
/lib/firmware/amd-ucode
%endif
%if "%flavor" == "compressed"
%files all
%doc WHENCE README
@@SUBPKGFILES@@
%endif
%changelog