File librandombytes.spec of Package librandombytes
#
# spec file for package librandombytes
#
# Copyright (c) 2025 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/
#
%define sover 1
Name: librandombytes
Version: 20240318
Release: 0
Summary: This C library provides a simple API for generating fresh randomness
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
License: MIT
Group: Development/Libraries/C and C++
URL: https://randombytes.cr.yp.to/
Source: https://randombytes.cr.yp.to/librandombytes-%{version}.tar.gz
# PATCH-FIX-SUSE: Ignore not recognized configure arguments and fix install paths
Patch0: fix-configure.patch
BuildRequires: gcc
BuildRequires: python3
BuildRequires: openssl-devel
%description
Random bytes are often used directly in applications. Random bytes are also the foundation of more complicated random objects,
such as random integers in a limited interval, random floating-point numbers from a (nearly) normal distribution, and random keys used in public-key cryptosystems.
librandombytes is dedicated to obtaining fresh random bytes in the first place, and leaves it to higher-level libraries to convert those bytes into other types of random objects.
%package -n librandombytes%{sover}
Summary: A C microlibrary for counting CPU cycles
Group: Development/Libraries/C and C++
%description -n librandombytes%{sover}
Random bytes are often used directly in applications. Random bytes are also the foundation of more complicated random objects,
such as random integers in a limited interval, random floating-point numbers from a (nearly) normal distribution, and random keys used in public-key cryptosystems.
librandombytes is dedicated to obtaining fresh random bytes in the first place, and leaves it to higher-level libraries to convert those bytes into other types of random objects.
%package devel
Summary: Development files for librandombytes library
Group: Development/Languages/C and C++
Requires: librandombytes%{sover} = %{version}
%description devel
Development files for librandombytes -librandombytes is dedicated to obtaining fresh random bytes in the first place,
and leaves it to higher-level libraries to convert those bytes into other types of random objects.
%package -n randombytes
Summary: Command-line tool for random byte generation info (librandombytes)
Group: Development/Languages/Other
Requires: librandombytes%{sover} = %{version}
%description -n randombytes
Command-line tool for random byte generation info (librandombytes)
%prep
%autosetup -p1
%build
%configure
%make_build
%install
%make_install
chmod +x %{buildroot}%{_libdir}/librandombytes-openssl.so.%{sover}
chmod +x %{buildroot}%{_libdir}/librandombytes-kernel.so.%{sover}
%check
%post -n librandombytes%{sover} -p /sbin/ldconfig
%postun -n librandombytes%{sover} -p /sbin/ldconfig
%files -n librandombytes%{sover}
%license doc/license.md
%doc %{_mandir}/man3/randombytes.3.gz
%{_libdir}/librandombytes-kernel.so.%{sover}
%{_libdir}/librandombytes.so.%{sover}
%{_libdir}/librandombytes-openssl.so.%{sover}
%files devel
%{_includedir}/randombytes.h
%{_libdir}/librandombytes-kernel.so
%{_libdir}/librandombytes.so
%{_libdir}/librandombytes-openssl.so
%files -n randombytes
%{_bindir}/randombytes-info
%doc %{_mandir}/man1/randombytes-info.1.gz
%changelog