%global debug_package %{nil}
%global gituser       hannob
%global gitname       rdrand-test
%global commit        cb8d457476955be6c4d03ccab54927eac8717e94
%global shortcommit   %(c=%{commit}; echo ${c:0:7})
%global gitcounter    19
Name:           rdrand-test
Version:        1.0.git.%{gitcounter}
Release:        %{shortcommit}%{?dist}
Summary:        Testing the rdrand CPU instruction
License:        LGPL-2.1+
Group:          System/Console
Url:            https://github.com/hannob/rdrand-test/
Source0:        https://github.com/%{gituser}/%{gitname}/tarball/%{commit}#/%{name}-%{shortcommit}.tar.gz
BuildRequires:  gcc
BuildRequires:  devscripts
%description
Testing the rdrand CPU instruction, that is broken on some AMD CPU types.
%prep
%setup -q -n %{gituser}-%{name}-%{shortcommit}
%build
%set_build_flags
gcc %{build_cflags} %{build_ldflags} -o %{name} rdrand-test.c
%install
install -Dm755 %{name} %{buildroot}%{_bindir}/%{name}
hardening-check -sv --nobranchprotection %{name}
%files
%{_bindir}/%{name}
%doc README.md
%license LICENSE
%changelog
* Sat Jan 25 2020 samoht0  git-master
- change versioning scheme
* Tue Jul 09 2019 samoht0  git-master
- package creation