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