File trng.spec of Package failed_trng

Name:           trng
Version:        0.1
Release:        2.1
Summary:        True Random Number Generator utilities

License:        MIT
URL:            https://example.org/trng
Source0:        %{name}-%{version}.tar.gz

BuildRequires:  cmake
BuildRequires:  make
BuildRequires:  gcc
BuildRequires:  g++
BuildRequires:  ctest

%description
Utilities and tests for a True Random Number Generator (TRNG).

%prep
%setup -q

%build
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j%{_smp_mflags}

%check
# Run CTest to execute the test suite. Avoid using rpm macro parentheses that
# evaluate shell commands unexpectedly; call ctest directly.
cd build
ctest --output-on-failure -j$(nproc || echo 1)

%install
cd build
make DESTDIR=%{buildroot} install

%files
%doc README.md
%license LICENSE
/usr/local/bin/*

%changelog
* Fri Aug  8 2025 Packager <packager@example.org> - 0.1-2.1
- Initial packaged version, fixed spec %check invocation to call ctest directly.
openSUSE Build Service is sponsored by