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