%define _default_patch_fuzz 2
Name:                vboot-utils
Version:             20190823
Release:             6
Summary:             Chromium OS verified boot utility
License:             BSD
URL:                 https://chromium.googlesource.com/chromiumos/platform/vboot_reference
ExclusiveArch:       aarch64 x86_64
Source0:             %{name}-595108c0.tar.xz
Patch0001:           vboot-utils-595108c0-gcc10.patch
BuildRequires:       gcc-c++ openssl-devel trousers-devel libyaml-devel xz-devel libuuid-devel python3
%description
Verify boot is a collection of utilities for chromebook computers. Package and sign the kernel and
manage gpt partitions.

%prep
%autosetup -n vboot-utils-595108c0 -p1

%build
%ifarch aarch64
%global ARCH arm
%endif
%ifarch x86_64
%global ARCH x86_64
%endif
%make_build V=1 ARCH=%{ARCH} COMMON_FLAGS="$RPM_OPT_FLAGS"

%install
%make_install V=1 DESTDIR=%{buildroot}/usr ARCH=%{ARCH} COMMON_FLAGS="$RPM_OPT_FLAGS"
rm -rf %{buildroot}/usr/lib/pkgconfig/
rm -rf %{buildroot}/usr/default/

%check
make runtests || true

%files
%doc README LICENSE
%{_bindir}/*

%changelog
* Fri Jul 30 2021 sunguoshuai <sunguoshuai@huawei.com> - 20190823-6
- upgrade to 20190823

* Tue Oct 27 2020 Anan Fu <fuanan3@huawei.com> - 20180531-5
- disable python2

* Wed Jan 8 2020 leiju <leiju4@huawei.com> - 20180531-4
- fix unaligned point value with GCC9

* Wed Jan 8 2020 fengbing <fengbing7@huawei.com> - 20180531-3
- Package init
