%global debug_package %{nil}
%define upstream_version 2.1-36

Name:           microcode_ctl
Summary:        Microcode update for CPU
Version:        2.1
Release:        36
License:        GPLv2+ and Redistributable, no modification permitted
URL:            https://pagure.io/microcode_ctl
ExclusiveArch:  %{ix86} x86_64
Source0:        https://releases.pagure.org/microcode_ctl/%{name}-%{upstream_version}.tar.xz

%description
This is a tool to transform and deploy microcode update for x86 CPUs.

%prep
%autosetup -n %{name}-%{upstream_version}

%build
%{make_build} CFLAGS="$RPM_OPT_FLAGS"

%install
make DESTDIR=%{buildroot} PREFIX=%{_prefix} INSDIR=/usr/sbin install clean

%files
/lib/firmware/*
%doc /usr/share/doc/microcode_ctl/*

%changelog
* Tue Jul 19 2022 houyingchao <houyingchao@h-partners.com> - 2.1-36
- Upgrade to 2.1-36
- Fix CVE-2021-0146

* Thu Sep 23 2021 yaoxin <yaoxin30@huawei.com> - 2.1-33
- update version to 2.1-33, fix CVE-2020-24511 CVE-2020-24512

* Mon Dec 14 2020 zhanghua <zhanghua40@huawei.com> - 2.1-28
- update version to 2.1-31, fix CVE-2020-8695, CVE-2020-8696, CVE-2020-8698

* Thu Nov 7 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.1-27
- Package init
