File libksba.spec of Package libksba.27311

#
# spec file for package libksba
#
# Copyright (c) 2023 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/
#


Name:           libksba
Version:        1.3.0
Release:        0
%define soname 8
Summary:        A X.509 Library
License:        (GPL-2.0-or-later OR LGPL-3.0-or-later) AND GPL-3.0-or-later AND MIT
Group:          Development/Libraries/C and C++
URL:            http://www.gnupg.org/aegypten/
Source:         ftp://ftp.gnupg.org/gcrypt/libksba//libksba-%{version}.tar.bz2
Patch:          libksba-CVE-2014-9087.patch
Patch1:         0001-Fix-encoding-of-invalid-utf-8-strings-in-dn.c.patch
Patch2:         0002-Fix-integer-overflow-in-the-BER-decoder.patch
Patch3:         0003-Do-not-abort-on-decoder-stack-overflow.patch
Patch4:         0004-Fix-lookup-of-ECC-OIDs-by-name.patch
Patch5:         0005-Fix-possible-read-access-beyond-the-buffer.patch
Patch6:         0006-Fix-an-undefined-return-value-in-ksba_cert_get_diges.patch
Patch7:         libksba-CVE-2022-3515.patch
#PATCH-FIX-UPSTREAM bsc#1206579 CVE-2022-47629 integer overflow in the CRL signature parser
Patch8:         libksba-CVE-2022-47629.patch
BuildRequires:  libgpg-error-devel >= 1.8
BuildRequires:  libtool
PreReq:         %install_info_prereq
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
KSBA is a library to simplify the task of working with X.509
certificates, CMS data, and related data.

%package -n %{name}%{soname}
Summary:        A X.509 Library
Group:          Development/Libraries/C and C++
Provides:       %{name} = %{version}
Obsoletes:      %{name} < %{version}

%description -n %{name}%{soname}
KSBA is a library to simplify the task of working with X.509
certificates, CMS data, and related data.

%package devel
Summary:        A X.509 Library
Group:          Development/Libraries/C and C++
Requires:       libgpg-error-devel
Requires:       libksba = %{version}
Provides:       libksba:/usr/include/ksba.h

%description devel
KSBA is a library to simplify the task of working with X.509
certificates, CMS data, and related data.

This package contains the needed files to compile and link against the
libksba.

%prep
%setup -q -n libksba-%{version}
%patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1

%build
%configure --disable-static --with-pic
make %{?_smp_mflags}

%check
make check

%install
%make_install
rm -fv %{buildroot}%{_libdir}/*.la

%post -n %{name}%{soname} -p /sbin/ldconfig

%postun -n %{name}%{soname} -p /sbin/ldconfig

%clean
rm -rf %{buildroot}

%files -n %{name}%{soname}
%defattr(-,root,root)
%doc README AUTHORS COPYING ChangeLog NEWS THANKS TODO
%{_libdir}/libksba*.so.*

%post devel
%install_info --info-dir=%{_infodir} %{_infodir}/ksba.info.gz

%postun devel
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ksba.info.gz

%files devel
%defattr(-,root,root)
%{_bindir}/*
%{_libdir}/libksba*.so
%{_includedir}/*
%doc %{_infodir}/ksba*
%{_datadir}/aclocal/*

%changelog
openSUSE Build Service is sponsored by