Files
openrng/openrng.spec

88 lines
2.5 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package openrng
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: openrng
Version: 24.10
%define lname libopenrng1
Release: 0
Summary: Random Number Generator library
License: MIT
Group: Development/Libraries/C and C++
URL: https://gitlab.arm.com/libraries/openrng
Source0: https://gitlab.arm.com/libraries/openrng/-/archive/v%{version}/openrng-v%{version}.tar.gz
BuildRequires: cmake
BuildRequires: gcc-c++ >= 11
BuildRequires: Catch2-devel
ExclusiveArch: aarch64 x86_64
%description
OpenRNG is a Random Number Generator library developed at ARM,
with VSL interfaces and oneMKL-like generators/initializations.
%package -n %{lname}
Summary: Random Number Generator library
Group: System/Libraries
%description -n %{lname}
OpenRNG is a Random Number Generator library developed at ARM. It
includes the interface to the random number generation part of the
Vector Statistics Library (VSL) developed by Intel and shipped for
x86 processors as part of oneMKL1.
The same generators and initializations are used as documented
for oneMKL. Functions which return bit sequences are bitwise
reproducible between ARM and x86. If an integer or floating point
answer is requested, answers may differ as the precision of
various operations is different between the two libraries.
%package devel
Summary: Development headers and libraries for openrng
Group: Development/Libraries/C and C++
Requires: %{lname} = %{version}
%description devel
This package contains the development libraries and headers for openrng.
%prep
%autosetup -p1 -n openrng-v%{version}
%build
%cmake \
-DBUILD_TESTING=ON \
-DOPENRNG_LOCAL_CATCH=On
%cmake_build
%install
%cmake_install
%check
%ctest
%ldconfig_scriptlets -n %{lname}
%files -n %{lname}
%license LICENSE
%{_libdir}/libopenrng.so.*
%files devel
%doc README.md
%{_includedir}/openrng.h
%{_libdir}/libopenrng.so
%changelog