Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37399871
en ru br
ALT Linux repos
S:3.8.1-alt2

Group :: System/Libraries
RPM: gnutls30

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define libgnutls_soname 30
%define libgnutlsxx_soname 30
%define libgnutls_openssl_soname 27

Name: gnutls%libgnutls_soname
Version: 3.8.1
Release: alt2

Summary: A TLS protocol implementation
# The libgnutls library is LGPLv2.1+, utilities and remaining libraries are GPLv3+
License: LGPLv2.1+ and GPLv3+
Group: System/Libraries
Url: https://gnutls.org/
# ftp://ftp.gnutls.org/pub/gnutls/gnutls-%version.tar.bz2
Source: gnutls-%version.tar

Patch3: Fix-privkey-verify-broken-test.patch
Patch4: tests-Use-IPv4-only-in-s_server.patch
Patch8: fix-32bit-LTS.patch
Patch10: tests-Don-t-use-lscpu.patch
Patch11: tests-Fix-work-with-ALT-faketime.patch

# Patch from upstream git, must be dropped when new version

# will be released.
Patch100: Move-the-GNUTLS_NO_EXTENSIONS-compatibility-define-t.patch

%define libcxx libgnutlsxx%libgnutlsxx_soname
%define libssl libgnutls%{libgnutls_openssl_soname}-openssl
#set_automake_version 1.11

# Automatically added by buildreq on Thu Dec 08 2011

BuildRequires: gcc-c++ gtk-doc libgcrypt-devel libp11-kit-devel libreadline-devel libtasn1-devel makeinfo zlib-devel
BuildRequires: libidn2-devel libunistring-devel
BuildRequires: libnettle-devel >= 3.6-alt1

# For tests

%{?!_without_check:%{?!_disable_check:BuildRequires: iproute2}}
%{?!_without_check:%{?!_disable_check:BuildRequires: /proc}}
%{?!_without_check:%{?!_disable_check:BuildRequires: faketime}}
# tests/pkcs11/tls-neg-pkcs11-key.c doesn't work with softhsm-2.1.0:
%{?!_without_check:%{?!_disable_check:BuildRequires: softhsm >= 2.4.0}}
%{?!_without_check:%{?!_disable_check:BuildRequires: openssl}}
%{?!_without_check:%{?!_disable_check:BuildRequires: libssl-devel}}
%{?!_without_check:%{?!_disable_check:BuildRequires: socat}}
%{?!_without_check:%{?!_disable_check:BuildRequires: ppp}}
%{?!_without_check:%{?!_disable_check:BuildRequires: /dev/pts}}
%ifnarch %e2k
# no libseccomp on e2k for now
%{?!_without_check:%{?!_disable_check:BuildRequires: libseccomp-devel}}
%endif

%description
GnuTLS is a project that aims to develop a library which provides a
secure  layer, over a reliable transport layer.  Currently the GnuTLS
library implements the proposed standards by the IETF's TLS working
group.

%package -n lib%name
Summary: Transport Layer Security library
License: LGPLv2.1+
Group: System/Libraries
Provides: libgnutls = %version
Obsoletes: libgnutls < %version
Obsoletes: libgnutls-new < %version

%description -n lib%name
GnuTLS is a project that aims to develop a library which provides a
secure  layer, over a reliable transport layer.  Currently the GnuTLS
library implements the proposed standards by the IETF's TLS working
group.

This package contains the GnuTLS runtime library.

%package -n libgnutls-devel
Summary: Development files for lib%name
Group: Development/C
Requires: lib%name = %version-%release
Obsoletes: libgnutls-new-devel < %version

%description -n libgnutls-devel
GnuTLS is a project that aims to develop a library which provides a
secure  layer, over a reliable transport layer.  Currently the GnuTLS
library implements the proposed standards by the IETF's TLS working
group.

This package contains headers and other development files required to
build GnuTLS-based software.

%package -n %libcxx
Summary: Transport Layer Security C++ library
Group: System/Libraries
License: GPLv3+
Requires: lib%name = %version-%release
Provides: libgnutlsxx = %version
Obsoletes: libgnutlsxx < %version
Obsoletes: libgnutls-newxx < %version

%description -n %libcxx
GnuTLS is a project that aims to develop a library which provides a
secure  layer, over a reliable transport layer.  Currently the GnuTLS
library implements the proposed standards by the IETF's TLS working
group.

This package contains the GnuTLS C++ runtime library.

%package -n libgnutlsxx-devel
Summary: Development files for libgnutlsxx
Group: Development/C++
Requires: %libcxx = %version-%release
Requires: libgnutls-devel = %version-%release
Obsoletes: libgnutls-newxx-devel < %version

%description -n libgnutlsxx-devel
GnuTLS is a project that aims to develop a library which provides a
secure  layer, over a reliable transport layer.  Currently the GnuTLS
library implements the proposed standards by the IETF's TLS working
group.

This package contains headers and other development files required to
build GnuTLS-based software using C++.

%package -n %libssl
Summary: OpenSSL compatibility layer for the GnuTLS library
Group: System/Libraries
Requires: lib%name = %version-%release
Provides: libgnutls-openssl = %version
Obsoletes: libgnutls-openssl < %version
Obsoletes: libgnutls-new-openssl < %version

%description -n %libssl
GnuTLS is a project that aims to develop a library which provides a
secure  layer, over a reliable transport layer.  Currently the GnuTLS
library implements the proposed standards by the IETF's TLS working
group.

This package contains the GnuTLS runtime OpenSSL compatibility library.

%package -n libgnutls-openssl-devel
Summary: Development files for %libssl
Group: Development/C
Requires: %libssl = %version-%release
Requires: libgnutls-devel = %version-%release
Obsoletes: libgnutls-new-openssl-devel < %version

%description -n libgnutls-openssl-devel
GnuTLS is a project that aims to develop a library which provides a
secure  layer, over a reliable transport layer.  Currently the GnuTLS
library implements the proposed standards by the IETF's TLS working
group.

This package contains headers and other development files required to
build applications using the GnuTLS compatibility OpenSSL library.

%package -n gnutls-utils
Summary: TLS protocol utilities
Group: Security/Networking
Obsoletes: gnutls-utils26 < %version-%release
Obsoletes: gnutls-utils28 < %version-%release

%description -n gnutls-utils
GnuTLS is a project that aims to develop a library which provides a
secure  layer, over a reliable transport layer.  Currently the GnuTLS
library implements the proposed standards by the IETF's TLS working
group.

This package contains command line TLS client and server, and
certificate manipulation tools.

%package devel-doc
Summary: Development documentation for GnuTLS
Group: Development/C
Conflicts: libgnutls-devel < %version
Provides: gnutls-devel-doc = %version
Obsoletes: gnutls-devel-doc < %version
Obsoletes: gnutls-new-devel-doc < %version
BuildArch: noarch

%description devel-doc
GnuTLS is a project that aims to develop a library which provides a
secure  layer, over a reliable transport layer.  Currently the GnuTLS
library implements the proposed standards by the IETF's TLS working
group.

This package contains the GnuTLS API Reference Manual.

%prep
%setup -n gnutls-%version
%patch3 -p2
%patch8 -p1
%patch10 -p1
%patch11 -p2

%patch100 -p1

touch doc/*.texi
rm doc/*.info*
rm aclocal.m4 m4/{libtool,lt*}.m4
# Thanks to USE_POSIX_THREADS_WEAK feature, we have to link
# tests with  at LIBMULTITHREAD at  in --no-as-needed mode.
sed -i 's/^\(test_[^ +=]\+\)_LDADD.* at LIBMULTITHREAD at .*/&\n\1_LDFLAGS = -Wl,--no-as-needed/' src/gl/tests/Makefile.*
# Use soname in the names of locale files
sed -i -r 's/^DOMAIN = [^[:blank:]#]+/&%libgnutls_soname/' po/Makevars

%build
%autoreconf
%def_disable static
%configure \
--disable-rpath \
--disable-static \
--disable-silent-rules \
--disable-libdane  \
--without-tpm \
--with-default-trust-store-file=/usr/share/ca-certificates/ca-bundle.crt \
--with-included-libtasn1=no \
--enable-openssl-compatibility \
--docdir=%_docdir/gnutls-%version/
make MAKEINFOFLAGS=--no-split

%install
%makeinstall_std
find %buildroot%_infodir/ -name '*.png' -delete -print
%define docdir %_docdir/gnutls-%version
mkdir -p %buildroot%docdir/{examples,reference}
install -p -m644 AUTHORS NEWS README.md THANKS %buildroot%docdir/
install -p -m644 doc/*.{cfg,css,html,png} %buildroot%docdir/
install -pm644 doc/examples/*.[hc]* %buildroot%docdir/examples/
install -pm644 doc/reference/html/* %buildroot%docdir/reference/
ln -s %_licensedir/GPL-2 %buildroot%docdir/COPYING
ln -s %_licensedir/LGPL-2.1 %buildroot%docdir/COPYING.LIB

%find_lang gnutls%libgnutls_soname
%set_verify_elf_method strict
%define _unpackaged_files_terminate_build 1

%check
# The option inserted by the patch is unknown in older openssl:
if openssl s_server --help 2>&1 | grep -Ewe '^[[:blank:]]*-4'; then
  patch -p2 < %PATCH4
fi
# Workaround for tests: gnutls-serv will be rebuilded for some reason
# when it started, so run it before make check to be rebuilded and therefore
# tests willn't fail due to timeout.
src/gnutls-serv --help >/dev/null 2>&1

make -k check

%files -n lib%name -f gnutls%libgnutls_soname.lang
%dir %docdir
%docdir/[ACNRT]*
%_libdir/libgnutls.so.%libgnutls_soname
%_libdir/libgnutls.so.%libgnutls_soname.*

%files -n %libcxx
%_libdir/libgnutlsxx.so.%libgnutlsxx_soname
%_libdir/libgnutlsxx.so.%libgnutlsxx_soname.*

%files -n %libssl
%_libdir/libgnutls-openssl.so.%libgnutls_openssl_soname
%_libdir/libgnutls-openssl.so.%libgnutls_openssl_soname.*

%files -n libgnutls-devel
%_includedir/gnutls/
%exclude %_includedir/gnutls/gnutlsxx.h
%exclude %_includedir/gnutls/openssl.h
%_libdir/libgnutls.so
%_pkgconfigdir/gnutls.pc

%files -n libgnutlsxx-devel
%dir %_includedir/gnutls/
%_includedir/gnutls/gnutlsxx.h
%_libdir/libgnutlsxx.so


%files -n libgnutls-openssl-devel
%dir %_includedir/gnutls/
%_includedir/gnutls/openssl.h
%_libdir/libgnutls-openssl.so

%files devel-doc
%dir %docdir
%docdir/*.css
%docdir/*.html
%docdir/*.png
%docdir/examples/
%docdir/reference/
%_man3dir/*
%_infodir/*

%files -n gnutls-utils
%_bindir/*
%_man1dir/*
%dir %docdir
%docdir/*.cfg

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin