File wolfssl.spec of Package wolfssl

#
# spec file for package wolfssl
#
# Copyright (c) 2024 mantarimay
# Copyright (c) 2018 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/
#


%define sonum 42
Name:           wolfssl
Version:        5.7.4
Release:        0
Summary:        Embedded SSL Library
License:        GPL-2.0-only
Group:          Productivity/Networking/Security
URL:            https://github.com/wolfSSL/wolfssl
Source:         %{url}/archive/v%{version}-stable/wolfssl-%{version}-stable.tar.gz
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  doxygen
BuildRequires:  libtool
BuildRequires:  pkgconfig

%description
The wolfSSL embedded SSL library (formerly CyaSSL) is a lightweight
SSL/TLS library written in ANSI C and targeted for embedded, RTOS,
and resource-constrained environments - primarily because of its
small size, speed, and feature set. It is commonly used in standard
operating environments as well because of its royalty-free pricing
and excellent cross platform support. wolfSSL supports industry
standards up to the current TLS 1.3 and DTLS 1.2 levels.
Unit test example binaries in this package.

%package -n libwolfssl%{sonum}
Summary:        a lightweight SSL/TLS library
Group:          System/Libraries

%description -n libwolfssl%{sonum}
The wolfSSL embedded SSL library (formerly CyaSSL) is a lightweight
SSL/TLS library written in ANSI C and targeted for embedded, RTOS,
and resource-constrained environments - primarily because of its
small size, speed, and feature set. It is commonly used in standard
operating environments as well because of its royalty-free pricing
and excellent cross platform support. wolfSSL supports industry
standards up to the current TLS 1.3 and DTLS 1.2 levels.

%package doc
BuildArch:      noarch
Summary:        Documentation files files for %{name}
Group:          Productivity/Networking/Security

%description doc
This package contains the header files and development libraries
for %{name}. If you like to develop programs using %{name},
you will need to install %{name}-devel.

%package devel
Summary:        Header files and development libraries for %{name}
Group:          Development/Libraries/C and C++
Requires:       lib%{name}%{sonum} = %{version}
Recommends:     %{name}-doc = %{version}

%description devel
This package contains the header files and development libraries
for %{name}. If you like to develop programs using %{name},
you will need to install %{name}-devel.

%prep
%autosetup -n wolfssl-%{version}-stable -p1

%build
./autogen.sh
%configure \
		--disable-opensslall \
		--disable-opensslextra \
		--enable-aescbc-length-checks \
		--enable-curve25519 \
		--enable-ed25519 \
		--enable-ed25519-stream \
		--disable-oldtls \
		--enable-base64encode \
		--enable-tlsx \
		--enable-scrypt \
		--disable-examples \
		--enable-keygen \
		--enable-wolfssh \
		--enable-jni

%make_build

%install
%make_install
rm %{buildroot}%{_libdir}/*.la
mkdir %{buildroot}%{_docdir}
mv %{buildroot}%{_datadir}/doc/wolfssl %{buildroot}%{_docdir}/wolfssl

%if 1 == 0
%check
testsuite/testsuite.test
%endif

%post -n libwolfssl%{sonum} -p /sbin/ldconfig
%postun -n libwolfssl%{sonum} -p /sbin/ldconfig

%files doc
%license COPYING
%doc ChangeLog.md README.md
%{_docdir}/wolfssl

%files  -n libwolfssl%{sonum}
%license COPYING
%{_libdir}/*.so.%{sonum}*

%files devel
%{_bindir}/wolfssl-config
%{_includedir}/wolfssl
%{_libdir}/pkgconfig/wolfssl.pc
%{_libdir}/libwolfssl.so

%changelog
openSUSE Build Service is sponsored by