File openconnect.spec of Package openconnect.15517

#
# spec file for package openconnect
#
# 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 http://bugs.opensuse.org/
#


Name:           openconnect
Version:        7.08
Release:        0
Summary:        Open client for Cisco AnyConnect VPN
License:        LGPL-2.1-or-later
Group:          Productivity/Networking/Security
Url:            http://www.infradead.org/openconnect.html
Source0:        ftp://ftp.infradead.org/pub/%{name}/%{name}-%{version}.tar.gz
Source1:        vpnc-script
# PATCH-FIX-SLE openconnect-CVE-2019-16239.patch bsc#1151178, CVE-2019-16239 sckang@suse.com -- Fix buffer overflow with chunked HTTP handling.
Patch0:         openconnect-CVE-2019-16239.patch
# PATCH-FIX-UPSTREAM openconnect-CVE-2020-12105.patch bsc#1170452, CVE-2020-12105 sckang@suse.com -- Use OpenSSL X509_check_host() and X509_check_ip() correctly.
Patch1:         openconnect-CVE-2020-12105.patch
# PATCH-FIX-UPSTREAM openconnect-CVE-2020-12823.patch bsc#1171862, CVE-2020-12823, gl#openconnect/openconnect!108 sckang@suse.com -- gnutls: prevent buffer overflow in get_cert_name.
Patch2:         openconnect-CVE-2020-12823.patch
BuildRequires:  libgnutls-devel
%if 0%{?suse_version} >= 1320
BuildRequires:  liblz4-devel
%endif
BuildRequires:  libproxy-devel
BuildRequires:  libtomcrypt-devel
BuildRequires:  pkg-config
BuildRequires:  stoken-devel
BuildRequires:  pkgconfig(libpcsclite)
BuildRequires:  pkgconfig(libpskc)
# == docs ==
BuildRequires:  groff-full
BuildRequires:  python2-base
BuildRequires:  python2-xml
# == docs ==
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(gconf-2.0)
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(libxml-2.0)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This package provides a client for Cisco's "AnyConnect" VPN, which uses
HTTPS and DTLS protocols.  AnyConnect is supported by the ASA5500 Series,
by IOS 12.4(9)T or later on Cisco SR500, 870, 880, 1800, 2800, 3800,
7200 Series and Cisco 7301 Routers, and probably others.

%package devel
Summary:        Development files and headers for %{name}
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Recommends:     pkg-config

%description devel
This package provides a client for Cisco's "AnyConnect" VPN, which uses
HTTPS and DTLS protocols.  AnyConnect is supported by the ASA5500 Series,
by IOS 12.4(9)T or later on Cisco SR500, 870, 880, 1800, 2800, 3800,
7200 Series and Cisco 7301 Routers, and probably others.

This packages provides development files and headers needed to build
packages against openconnect

%package doc
Summary:        Documentation for %{name}
Group:          Development/Libraries/C and C++
Recommends:     %{name} = %{version}

%description doc
This package provides a client for Cisco's "AnyConnect" VPN, which uses
HTTPS and DTLS protocols.  AnyConnect is supported by the ASA5500 Series,
by IOS 12.4(9)T or later on Cisco SR500, 870, 880, 1800, 2800, 3800,
7200 Series and Cisco 7301 Routers, and probably others.

This packages provides documentation and help files for openconnect

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%lang_package

%build
%configure --docdir=%{_docdir}/%{name}/ --with-vpnc-script=/etc/openconnect/vpnc-script
make

%install
%make_install
mkdir -p %{buildroot}/%{_sysconfdir}/openconnect
cp %{SOURCE1} %{buildroot}/%{_sysconfdir}/openconnect/
rm %{buildroot}%{_libdir}/libopenconnect.la
%find_lang %{name}

%post   -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%{_libdir}/libopenconnect.so.*
%{_mandir}/man8/*
%{_sbindir}/openconnect
%dir %{_sysconfdir}/openconnect
%attr(0755,root,root) %{_sysconfdir}/openconnect/vpnc-script

%files devel
%defattr(-,root,root)
%{_includedir}/openconnect.h
%{_libdir}/libopenconnect.so
%{_libdir}/pkgconfig/openconnect.pc

%files doc
%defattr(-,root,root)
%doc AUTHORS COPYING.LGPL TODO
%dir %{_docdir}/%{name}
%dir %{_docdir}/%{name}/styles
%dir %{_docdir}/%{name}/images
%dir %{_docdir}/%{name}/inc
%doc %{_docdir}/%{name}/*.html
%doc %{_docdir}/%{name}/styles/main.css
%doc %{_docdir}/%{name}/images/*.png
%doc %{_docdir}/%{name}/images/*.svg
%doc %{_docdir}/%{name}/inc/*.tmpl

%files lang -f %{name}.lang
%defattr(-,root,root)

%changelog
openSUSE Build Service is sponsored by