]> git.pld-linux.org Git - packages/microcode-data-intel.git/blobdiff - microcode-data-intel.spec
up to 20201112
[packages/microcode-data-intel.git] / microcode-data-intel.spec
index c297d0c1dbbbc70b8ccb2ac1054a12a241dee453..f4676d081c3d69fdd442690eed4344ce0247cea9 100644 (file)
@@ -1,17 +1,15 @@
 Summary:       Microcode definitions for Intel processors
 Summary(pl.UTF-8):     Definicje mikrokodu dla procesorów Intela
 Name:          microcode-data-intel
-Version:       20150121
-Release:       2
+Version:       20201112
+Release:       1
 License:       INTEL SOFTWARE LICENSE AGREEMENT
 Group:         Base
-# http://downloadcenter.intel.com/, enter "processor microcode data file" to the search
-Source0:       http://downloadmirror.intel.com/24661/eng/microcode-%{version}.tgz
-# Source0-md5: 639b7f2af0a822fe006a4fa2ddf8052f
-# Tool for splitting Intel's microcode file. From Fedora
-Source1:       intel-microcode2ucode.c
+Source0:       https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/archive/microcode-%{version}.tar.gz
+# Source0-md5: d48388782e322c258e17f7d79201a9e0
+BuildRequires: iucode-tool
 Provides:      microcode-data
-ExclusiveArch: i686 pentium2 pentium3 pentium4 %{x8664} x32
+BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -22,29 +20,43 @@ definitions for all Intel processors.
 Te pliki danych mikrokodu dla Linuksa zawierają najnowsze definicje
 mikrokodu dla procesorów Intela.
 
+%package initrd
+Summary:       Microcode for initrd
+Summary(pl.UTF-8):     Mikrokod dla initrd
+Group:         Base
+
+%description initrd
+Intel microcode for initrd.
+
+%description initrd -l pl.UTF-8
+Mikrokod dla procesorów Intel dla initrd.
+
 %prep
-%setup -q -c
+%setup -q -n Intel-Linux-Processor-Microcode-Data-Files-microcode-%{version}
 
 %build
-if ! grep -q 0x00000000 microcode.dat; then
-       echo >&2 microcode.dat contains giberrish
-       exit 1
-fi
+%{_sbindir}/iucode_tool intel-ucode*/*-* -tb --write-to=microcode.bin
 
-%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags} -Wall -o intel-microcode2ucode %{SOURCE1}
-./intel-microcode2ucode microcode.dat > /dev/null || exit 1
+install -d kernel/x86/microcode
+ln microcode.bin kernel/x86/microcode/GenuineIntel.bin
+echo kernel/x86/microcode/GenuineIntel.bin | cpio -o -H newc -R 0:0 > intel-ucode.img
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sbindir},/lib/firmware}
+install -d $RPM_BUILD_ROOT{/lib/firmware,/boot}
 
-install intel-microcode2ucode $RPM_BUILD_ROOT%{_sbindir}
-mv intel-ucode $RPM_BUILD_ROOT/lib/firmware
+cp -a intel-ucode $RPM_BUILD_ROOT/lib/firmware
+cp -p intel-ucode.img $RPM_BUILD_ROOT/boot
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_sbindir}/intel-microcode2ucode
+%doc README.md releasenote.md security.md
 /lib/firmware/intel-ucode
+
+%files initrd
+%defattr(644,root,root,755)
+%doc README.md releasenote.md security.md
+/boot/intel-ucode.img
This page took 0.034502 seconds and 4 git commands to generate.