## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec %global forgeurl https://github.com/imneme/%{name}/ # The last tagged release was 0.98.1 in 2015, but there have been many # essential bug fixes since then, so we package a snapshot. See # https://github.com/imneme/pcg-cpp/issues/73. %global commit ffd522e7188bef30a00c74dc7eb9de5faff90092 Name: pcg-cpp Summary: PCG Random Number Generation, C++ Edition Version: 0.98.1 %forgemeta Release: %autorelease URL: %{forgeurl} # See LICENSE.spdx License: MIT or ASL 2.0 Source0: %{forgesource} BuildRequires: gcc-c++ BuildRequires: make # No compiled binaries are installed, so this would be empty. %global debug_package %{nil} %global common_description %{expand: This code provides an implementation of the PCG family of random number generators, which are fast, statistically excellent, and offer a number of useful features. Full details can be found at the PCG-Random website (http://www.pcg-random.org/). This version of the code provides many family members – if you just want one simple generator, you may prefer the minimal C version of the library. There are two kinds of generator, normal generators and extended generators. Extended generators provide k dimensional equidistribution and can perform party tricks, but generally speaking most people only need the normal generators. There are two ways to access the generators, using a convenience typedef or by using the underlying templates directly (similar to C++11’s std::mt19937 typedef vs its std::mersenne_twister_engine template). For most users, the convenience typedef is what you want, and probably you’re fine with pcg32 for 32-bit numbers. If you want 64-bit numbers, either use pcg64 (or, if you’re on a 32-bit system, making 64 bits from two calls to pcg32_k2 may be faster).} %description %{common_description} %package devel Summary: %{summary} BuildArch: noarch # Header-only library: Provides: %{name}-static = %{version}-%{release} %description devel %{common_description} %package doc Summary: Documentation and examples for %{name} BuildArch: noarch %description doc %{summary}. %prep %forgeautosetup find . -name '.gitignore' -print -delete # Make a copy of the sample/ directory that will not contain compiled # executables, since we would like to install the sources as documentation. cp -rp sample examples %build %set_build_flags %make_build %install %make_install PREFIX=%{_prefix} %check %make_build test %files devel %license LICENSE-APACHE.txt LICENSE-MIT.txt LICENSE.spdx %{_includedir}/pcg_extras.hpp %{_includedir}/pcg_random.hpp %{_includedir}/pcg_uint128.hpp %files doc %license LICENSE-APACHE.txt LICENSE-MIT.txt LICENSE.spdx %doc CONTRIBUTING.md %doc README.md %doc examples %changelog * ven. déc. 17 2021 Benjamin A. Beasley 0.98.1-2 - Let the -devel package be noarch * lun. sept. 20 2021 Benjamin A. Beasley 0.98.1-1 - Initial package (close RHBZ#2003169)