From 21597b7e37552da77dcab8d97941c1f3e941866a59673e83dad6e5bdb5de2b8a Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 30 Oct 2020 13:35:01 +0000 Subject: [PATCH] Accepting request 843656 from home:badshah400:branches:science A feature-rich random number generator in C++. OBS-URL: https://build.opensuse.org/request/show/843656 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/trng?expand=0&rev=1 --- .gitattributes | 23 +++++++++++++ .gitignore | 1 + trng-4.23.tar.gz | 3 ++ trng.changes | 6 ++++ trng.spec | 90 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 123 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 trng-4.23.tar.gz create mode 100644 trng.changes create mode 100644 trng.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/trng-4.23.tar.gz b/trng-4.23.tar.gz new file mode 100644 index 0000000..ee69e1a --- /dev/null +++ b/trng-4.23.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e00a8da673a20fa95e81a82d68a8fe4730c8126fafaebf07c767f1326fa8cda9 +size 1287312 diff --git a/trng.changes b/trng.changes new file mode 100644 index 0000000..2eab9ab --- /dev/null +++ b/trng.changes @@ -0,0 +1,6 @@ +------------------------------------------------------------------- +Fri Oct 23 11:57:26 UTC 2020 - Atri Bhattacharya + +- Initial package. +- Disable building on aarch64 because tests fail + [gh#rabauke/trng4#21]. diff --git a/trng.spec b/trng.spec new file mode 100644 index 0000000..620aed3 --- /dev/null +++ b/trng.spec @@ -0,0 +1,90 @@ +# +# spec file for package trng +# +# Copyright (c) 2020 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/ +# + + +%global shlib libtrng4-22 +Name: trng +Version: 4.23 +Release: 0 +Summary: Tina's Random Number Generator Library +License: BSD-3-Clause +URL: https://www.numbercrunch.de/trng/ +Source: https://github.com/rabauke/trng4/archive/v4.23.tar.gz#/%{name}-%{version}.tar.gz +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: libboost_headers-devel +BuildRequires: libboost_test-devel +BuildRequires: tbb-devel +# Tests fail on aarch64, see https://github.com/rabauke/trng4/issues/21 +ExcludeArch: aarch64 + +%description +TRNG is a modern C++ pseudo random number generator library. + +Key features: +* fully compatible with the C++11 random number facility as defined in +* implements various pseudo random number algorithms +* supports multiple streams of random numbers for parallel (multi-threaded) applications +* does not depend on a specific parallelization technique, may be used with any threading library or MPI +* pseudo random numbers can be sampled from many different distributions + +%package -n %{shlib} +Summary: Shared library for trng - Tina's Random Number Generator Library + +%description -n %{shlib} +TRNG is a modern C++ pseudo random number generator library. + +This package provides the shared libs for trng. + +%package devel +Summary: Headers and devel files for TRNG +Requires: %{shlib} = %{version} + +%description devel +TRNG is a modern C++ pseudo random number generator library. + +This package provides the headers and devel files for developing applications against TRNG. + +%prep +%autosetup -n %{name}4-%{version} + +%build +%cmake +%cmake_build + +%install +%cmake_install +find %{buildroot}%{_libdir} -name *.a -delete -print + +%check +export LD_LIBRARY_PATH="%{buildroot}%{_libdir}" +./%{__builddir}/tests/test_all --no_color_output -l test_suite -r short + +%post -n %{shlib} -p /sbin/ldconfig +%postun -n %{shlib} -p /sbin/ldconfig + +%files -n %{shlib} +%license COPYING +%{_libdir}/libtrng4.so.* + +%files devel +%license COPYING +%doc AUTHORS NEWS README doc/trng.pdf examples/ +%{_libdir}/libtrng4.so +%{_includedir}/trng/ + +%changelog