]> git.pld-linux.org Git - packages/microcode-data-intel.git/blob - microcode-data-intel.spec
1633f9ecd395d857009b1d09386f709fc3c0c22d
[packages/microcode-data-intel.git] / microcode-data-intel.spec
1 Summary:        Microcode definitions for Intel processors
2 Summary(pl.UTF-8):      Definicje mikrokodu dla procesorów Intela
3 Name:           microcode-data-intel
4 Version:        20170707
5 Release:        2
6 License:        INTEL SOFTWARE LICENSE AGREEMENT
7 Group:          Base
8 # http://downloadcenter.intel.com/, enter "processor microcode data file" to the search
9 Source0:        http://downloadmirror.intel.com/26925/eng/microcode-%{version}.tgz
10 # Source0-md5:  fe4bcb12e4600629a81fb65208c34248
11 # Tool for splitting Intel's microcode file. From Fedora
12 Source1:        intel-microcode2ucode.c
13 # Produces single file for use by boot loader (like grub)
14 Source2:        intel-microcode2ucode-single.c
15 BuildRequires:  cpio
16 Provides:       microcode-data
17 BuildArch:      noarch
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
21 The microcode data file for Linux contains the latest microcode
22 definitions for all Intel processors.
23
24 %description -l pl.UTF-8
25 Te pliki danych mikrokodu dla Linuksa zawierają najnowsze definicje
26 mikrokodu dla procesorów Intela.
27
28 %package initrd
29 Summary:        Microcode for initrd
30 Summary(pl.UTF-8):      Mikrokod dla initrd
31 Group:          Base
32
33 %description initrd
34 Intel microcode for initrd.
35
36 %description initrd -l pl.UTF-8
37 Mikrokod dla procesorów Intel dla initrd.
38
39 %prep
40 %setup -qc
41
42 %build
43 if ! grep -q 0x00000000 microcode.dat; then
44         echo >&2 microcode.dat contains giberrish
45         exit 1
46 fi
47
48 %{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags} -Wall -o intel-microcode2ucode %{SOURCE1}
49 %{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags} -Wall -o intel-microcode2ucode-single %{SOURCE2}
50 ./intel-microcode2ucode microcode.dat > /dev/null || exit 1
51 ./intel-microcode2ucode-single microcode.dat > /dev/null || exit 1
52
53 %install
54 rm -rf $RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT{/lib/firmware,/boot}
56
57 mv intel-ucode $RPM_BUILD_ROOT/lib/firmware
58
59 install -d kernel/x86/microcode
60 mv microcode.bin kernel/x86/microcode/GenuineIntel.bin
61 echo kernel/x86/microcode/GenuineIntel.bin | cpio -o -H newc -R 0:0 > $RPM_BUILD_ROOT/boot/intel-ucode.img
62
63 %clean
64 rm -rf $RPM_BUILD_ROOT
65
66 %files
67 %defattr(644,root,root,755)
68 /lib/firmware/intel-ucode
69
70 %files initrd
71 %defattr(644,root,root,755)
72 /boot/intel-ucode.img
This page took 0.044266 seconds and 3 git commands to generate.