%global srcname gnutls Summary: A TLS protocol implementation Name: gnutls30 Version: 3.5.3 Release: 2%{?dist} # The libraries are LGPLv2.1+ (packaged), utilities are GPLv3+ (unpackaged) License: LGPv2+ URL: https://www.gnutls.org/ # The sources have been modified with "hobble-gnutls -e" script to remove patented SRP code #Source0: ftp://ftp.gnutls.org/gcrypt/gnutls/%{srcname}-%{version}.tar.xz #Source1: ftp://ftp.gnutls.org/gcrypt/gnutls/%{srcname}-%{version}.tar.xz.sig Source0: %{srcname}-%{version}-hobbled.tar.xz Source100: README.fedora Patch0001: 0001-minitasn1-include-path-for-libdane.patch Patch0002: 0002-no-getrandom-support.patch BuildRequires: zlib-devel, libidn-devel, gmp-devel, nettle-devel BuildRequires: unbound-devel # Wildcard bundling exception https://fedorahosted.org/fpc/ticket/174 Provides: bundled(gnulib) = 20130424 # libtasn1 >= 4.3 unavailable in EPEL, bundled version provided Provides: bundled(libtasn1) = 4.8 # autogen-libopts-devel >= 5.18 unavailable in EPEL, bundled version provided # libopts is not used when building without utilities #Provides: bundled(autogen-libopts) %description GnuTLS is a secure communications library implementing the SSL, TLS and DTLS protocols and technologies around them. It provides a simple C language application programming interface (API) to access the secure communications protocols as well as APIs to parse and write X.509, PKCS #12, OpenPGP and other required structures. %package dane Summary: A DANE protocol implementation for GnuTLS Requires: %{name}%{?_isa} = %{version}-%{release} %description dane This package contains library that implements the DANE protocol for verifying TLS certificates through DNSSEC. %package devel Summary: Development files for the gnutls30 package Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}-dane%{?_isa} = %{version}-%{release} %description devel This package contains files needed for developing applications with the GnuTLS library. %prep %setup -q -n %{srcname}-%{version} install -m 0644 %{SOURCE100} README.fedora %patch0001 -p1 %patch0002 -p1 %build # NLS is disabled to avoid locales conflict with the gnutls package. %configure \ --disable-silent-rules \ --disable-static \ --disable-rpath \ \ --disable-doc \ --disable-manpages \ --disable-tools \ --disable-guile \ \ --disable-nls \ --without-tpm \ --without-p11-kit \ \ --disable-non-suiteb-curves \ --disable-srp-authentication \ \ --enable-cxx \ --enable-libdane --with-unbound-root-key-file=/var/lib/unbound/root.key \ --disable-openssl-compatiblity \ \ --with-included-libtasn1 make %{?_smp_mflags} %install %make_install # wipe libool archives rm -f %{buildroot}%{_libdir}/*.la # move headers to avoid conflicts with gnutls-devel install -m 0755 -d %{buildroot}%{_includedir}/%{name} mv %{buildroot}%{_includedir}/gnutls %{buildroot}%{_includedir}/%{name}/gnutls # move and fix unversioned symlinks as well install -m 0755 -d %{buildroot}%{_libdir}/%{name} for so in %{buildroot}%{_libdir}/*.so; do ln -s ../$(readlink "$so") %{buildroot}%{_libdir}/%{name}/$(basename "$so") rm "$so" done # fix paths to libdir and includedir in pkg-config mv %{buildroot}%{_libdir}/pkgconfig %{buildroot}%{_libdir}/%{name}/pkgconfig for pc in %{buildroot}%{_libdir}/%{name}/pkgconfig/*.pc; do sed -e '/^libdir=/c libdir=%{_libdir}/%{name}' \ -e '/^includedir=/c includedir=%{_includedir}/%{name}' \ -i "$pc" done %check make check %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %post dane -p /sbin/ldconfig %postun dane -p /sbin/ldconfig %files %doc doc/COPYING.LESSER %{_libdir}/libgnutls.so.* %{_libdir}/libgnutlsxx.so.* %files dane %{_libdir}/libgnutls-dane.so.* %files devel %doc README.fedora %{_includedir}/gnutls30 %{_libdir}/gnutls30 %changelog * Wed Aug 24 2016 Jan Vcelak - 3.5.3-2 - avoid conflict with gnutls-devel from RHEL base - add ldconfig into post and postun - add Provides for bundled libraries - fix License field * Fri Aug 12 2016 Jan Vcelak - 3.5.3-1 - initial library only package for EPEL 6