File libsodium.spec of Package libsodium
#
# spec file for package libsodium
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 libname libsodium
%global soname 23
Name: libsodium
Version: 1.0.18
Release: 2%{?dist}
Summary: The Sodium crypto library
License: ISC
URL: http://libsodium.org/
Source0: http://download.libsodium.org/libsodium/releases/%{name}-%{version}.tar.gz
BuildRequires: gcc
# manage update from 3rd party repository
Obsoletes: %{libname}%{soname} <= %{version}
%description
Sodium is a new, easy-to-use software library for encryption, decryption,
signatures, password hashing and more. It is a portable, cross-compilable,
installable, packageable fork of NaCl, with a compatible API, and an extended
API to improve usability even further. Its goal is to provide all of the core
operations needed to build higher-level cryptographic tools. The design
choices emphasize security, and "magic constants" have clear rationales.
The same cannot be said of NIST curves, where the specific origins of certain
constants are not described by the standards. And despite the emphasis on
higher security, primitives are faster across-the-board than most
implementations of the NIST standards.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Obsoletes: %{libname}%{soname}-devel <= %{version}
%description devel
This package contains libraries and header files for
developing applications that use %{name} libraries.
%package static
Summary: Static library for %{name}
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
Obsoletes: %{libname}%{soname}-static <= %{version}
%description static
This package contains the static library for statically
linking applications to use %{name}.
%prep
%setup -q
%build
%configure \
--disable-silent-rules \
--disable-opt
%make_build
%install
%make_install
rm -f %{buildroot}%{_libdir}/%{libname}.la
%check
make check
%files
%license LICENSE
%{_libdir}/%{libname}.so.%{soname}*
%files devel
%doc AUTHORS ChangeLog README.markdown THANKS
%doc test/default/*.{c,exp,h}
%doc test/quirks/quirks.h
%{_includedir}/sodium.h
%{_includedir}/sodium/
%{_libdir}/%{libname}.so
%{_libdir}/pkgconfig/%{libname}.pc
%files static
%{_libdir}/libsodium.a
%changelog