Name: mlxbf-bootctl
Version: 2.1
Release: 1%{?dist}
Summary: Mellanox BlueField boot partition management utility

License: BSD
Url: https://github.com/Mellanox/mlxbf-bootctl
Source: {{{ name=$(rpmspec -q --qf "%{name}-%{version}\n" mlxbf-bootctl.spec.rpkg); git_dir_pack dir_name="$name" source_name="$name".tar.gz }}}

# mlxbf-bootctl will build for most architectures, however this program is
# designed only to control BlueField SoCs, which are all aarch64, so only
# build for that architecture.
ExclusiveArch: aarch64

BuildRequires: gcc

%description
mlxbf-bootctl is used to control the two boot firmware (ATF, UEFI, etc...)
partitions present on most Mellanox BlueField devices. This includes switching
active partitions, listing the state of boot registers, and installing new
firmware.

# this section is automatically generated by rpkg
%prep
%setup

%build
%set_build_flags
%make_build

%install
# Note: make install normally installs to "/sbin"
%{__make} install DESTDIR=%{buildroot}%{_exec_prefix}
%{__install} -d %{buildroot}%{_mandir}/man8
%{__install} -m 0644 mlxbf-bootctl.8 %{buildroot}%{_mandir}/man8

%files
%{_sbindir}/mlxbf-bootctl
%{_mandir}/man8/mlxbf-bootctl.8.gz

%license LICENSE
%doc README.md

%changelog
* Thu Sep 3 2020 Spencer Lingard <spencer@nvidia.com> - 2.1-1
- Bump version to sync up with others
- Modify spec.rpkg to depend less on rpkg
- Add makefile to build SRPMs

* Mon Jun 22 2020 Spencer Lingard <spencer@nvidia.com> - 1.1-6
- Add set_build_flags macro to build step
- Warn user if mlxbf_bootctl kernel driver is not loaded

* Wed Jun 17 2020 Spencer Lingard <spencer@nvidia.com> - 1.1-5
- Simplify release tag
- Add comment explaining ExclusiveArch tag
- Improve description
- Remove unneeded build dependency
- Move mlxbf-bootctl from /sbin to /usr/sbin
- Pull in code coverage fixes

* Wed Jun 10 2020 Spencer Lingard <spencer@nvidia.com> - 1.1-4
- Add man page
- Add license

* Tue May 12 2020 Spencer Lingard <spencer@nvidia.com> - 1.1-3
Initial packaging.
