]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Add packaging files for OBS build
authorLuca Boccassi <bluca@debian.org>
Wed, 23 Feb 2022 22:39:28 +0000 (22:39 +0000)
committerLuca Boccassi <bluca@debian.org>
Wed, 2 Mar 2022 16:56:46 +0000 (16:56 +0000)
Signed-off-by: Luca Boccassi <bluca@debian.org>
.obs/debian/changelog [new file with mode: 0644]
.obs/debian/control [new file with mode: 0644]
.obs/debian/copyright [new file with mode: 0644]
.obs/debian/libopenconnect-dev.install [new file with mode: 0644]
.obs/debian/libopenconnect5.install [new file with mode: 0644]
.obs/debian/openconnect.install [new file with mode: 0644]
.obs/debian/rules [new file with mode: 0755]
.obs/openconnect.dsc [new file with mode: 0644]
.obs/openconnect.spec [new file with mode: 0644]

diff --git a/.obs/debian/changelog b/.obs/debian/changelog
new file mode 100644 (file)
index 0000000..d1a3304
--- /dev/null
@@ -0,0 +1,5 @@
+openconnect (8.20-0) unstable; urgency=medium
+
+  * Initial packaging.
+
+ -- OpenConnect Team <openconnect-devel@lists.infradead.org>  Wed, 23 Feb 2022 21:43:17 +0000
diff --git a/.obs/debian/control b/.obs/debian/control
new file mode 100644 (file)
index 0000000..d121825
--- /dev/null
@@ -0,0 +1,86 @@
+Source: openconnect
+Maintainer: OpenConnect Team <openconnect-devel@lists.infradead.org>
+Section: net
+Priority: optional
+Build-Depends: debhelper-compat (= 12),
+               groff,
+               libgcrypt20-dev,
+               libgnutls28-dev,
+               libkrb5-dev,
+               liblz4-dev,
+               libp11-kit-dev,
+               libpcsclite-dev,
+               libproxy-dev,
+               libsocket-wrapper [!hurd-i386] <!nocheck>,
+               libstoken-dev,
+               libtasn1-6-dev,
+               libtss2-dev,
+               libuid-wrapper [!alpha !hurd-i386 !kfreebsd-amd64 !kfreebsd-i386] <!nocheck>,
+               libxml2-dev,
+               locales-all <!nocheck>,
+               ocserv [!hurd-i386 !kfreebsd-amd64 !kfreebsd-i386] <!nocheck>,
+               openssl <!nocheck>,
+               pkg-config,
+               python3:any,
+               softhsm2 [!hurd-i386] <!nocheck>,
+               zlib1g-dev
+Standards-Version: 4.6.0
+Rules-Requires-Root: no
+Vcs-Browser: https://salsa.debian.org/debian/openconnect
+Vcs-Git: https://salsa.debian.org/debian/openconnect.git
+Homepage: https://www.infradead.org/openconnect/
+
+Package: openconnect
+Architecture: any
+Depends: vpnc-scripts, ${misc:Depends}, ${shlibs:Depends}
+Recommends: python3, python3-asn1crypto, python3-mechanize, python3-netifaces,
+Suggests: bash-completion,
+Description: open client for various network vendors SSL VPNs
+ OpenConnect is an SSL VPN client initially created to support Cisco's
+ AnyConnect SSL VPN. It has since been extended to support the Pulse Connect
+ Secure VPN (formerly known as Juniper Network Connect or Junos Pulse), the Palo
+ Alto Networks GlobalProtect SSL VPN, F5 Big-IP SSL VPN, Fortinet Fortigate SSL
+ VPN and Array Networks AG SSL VPN.
+ .
+ A corresponding OpenConnect VPN server implementation can be found in the
+ ocserv package.
+
+Package: libopenconnect-dev
+Architecture: any
+Multi-Arch: same
+Section: libdevel
+Depends: libgnutls28-dev,
+         liblz4-dev,
+         libopenconnect5 (= ${binary:Version}),
+         libp11-kit-dev,
+         libpcsclite-dev,
+         libpskc-dev,
+         libproxy-dev,
+         libstoken-dev,
+         libxml2-dev,
+         zlib1g-dev,
+         ${misc:Depends}
+Description: open client for various network vendors SSL VPNs - development files
+ OpenConnect is an SSL VPN client initially created to support Cisco's
+ AnyConnect SSL VPN. It has since been extended to support the Pulse Connect
+ Secure VPN (formerly known as Juniper Network Connect or Junos Pulse), the Palo
+ Alto Networks GlobalProtect SSL VPN, F5 Big-IP SSL VPN, Fortinet Fortigate SSL
+ VPN and Array Networks AG SSL VPN.
+ .
+ This package provides the header and development files.
+
+Package: libopenconnect5
+Architecture: any
+Multi-Arch: same
+Section: libs
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Recommends: ca-certificates
+Pre-Depends: ${misc:Pre-Depends}
+Description: open client for various network vendors SSL VPNs - shared library
+ OpenConnect is an SSL VPN client initially created to support Cisco's
+ AnyConnect SSL VPN. It has since been extended to support the Pulse Connect
+ Secure VPN (formerly known as Juniper Network Connect or Junos Pulse), the Palo
+ Alto Networks GlobalProtect SSL VPN, F5 Big-IP SSL VPN, Fortinet Fortigate SSL
+ VPN and Array Networks AG SSL VPN.
+ .
+ This package provides the shared library.
diff --git a/.obs/debian/copyright b/.obs/debian/copyright
new file mode 100644 (file)
index 0000000..3ad9a85
--- /dev/null
@@ -0,0 +1,175 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Source: ftp://ftp.infradead.org/pub/openconnect/
+
+Files: *
+Copyright: 2008-2016 Intel Corporation.
+           2006 Reimar Doeffinger
+           2008 Nick Andrew <nick@nick-andrew.net>
+           2012-2014 Kevin Cernekee <cernekee@gmail.com>
+           2013-2016 Nikos Mavrogiannopoulos
+           2013 John Morrissey <jwm@horde.net>
+           2016 Red Hat, Inc.
+           2016-2018 Daniel Lenski <dlenski@gmail.com>
+           2017-2018 James Bottomley <James.Bottomley@hansenpartnership.com>
+           2018 David Woodhouse <dwmw2@infradead.org>
+License: LGPL-2.1
+
+Files: compat.c
+Copyright: 2007, 2010, Nathan C. Myers <ncm@cantrip.org>
+License: BSD-3-clause
+
+Files: gnutls_tpm2_esys.c
+Copyright: 2017-2018, Fraunhofer SIT sponsored by Infineon Technologies AG
+License: BSD-3-clause-Fraunhofer
+
+Files: android/run_pie.c
+Copyright: 2014 The Chromium Authors
+License: BSD-3-clause-Google
+
+Files: tests/dtls-psk
+ tests/ns.sh
+ tests/sigterm
+Copyright: 2018 Nikos Mavrogiannopoulos
+License: GPL-2+
+
+Files: www/html.py
+Copyright: 2005 Thomas Gleixner <tglx@linutronix.de>
+License: GPL-2
+
+Files: debian/*
+Copyright: 2012-2019 Mike Miller <mtmiller@debian.org>
+           2008-2011 Ross Burton <ross@debian.org>
+           2019-2022 Luca Boccassi <bluca@debian.org>
+License: GPL-2+
+
+License: GPL-2
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2, as
+ published by the Free Software Foundation.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ .
+ On Debian systems, the complete text of the GNU General Public
+ License version 2 can be found in `/usr/share/common-licenses/GPL-2'.
+
+License: GPL-2+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ .
+ On Debian systems, the complete text of the GNU General Public
+ License version 2 can be found in `/usr/share/common-licenses/GPL-2'.
+
+License: LGPL-2.1
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License version 2.1, as published by the Free Software Foundation.
+ .
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ Lesser General Public License for more details.
+ .
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ .
+ On Debian systems, the full text of the GNU Lesser General Public
+ License version 2.1 can be found in `/usr/share/common-licenses/LGPL-2.1'.
+
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+    Redistributions of source code must retain the above copyright notice,
+    this list of conditions and the following disclaimer.
+ .
+    Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+ .
+    The name of the author must not be used to endorse or promote products
+    derived from this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+License: BSD-3-clause-Fraunhofer
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ .
+ 3. Neither the name of tpm2-tss-engine nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ THE POSSIBILITY OF SUCH DAMAGE.
+
+License: BSD-3-clause-Google
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ .
+    * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+    * Neither the name of Google Inc. nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/.obs/debian/libopenconnect-dev.install b/.obs/debian/libopenconnect-dev.install
new file mode 100644 (file)
index 0000000..b3ea361
--- /dev/null
@@ -0,0 +1,3 @@
+usr/include
+usr/lib/*/libopenconnect.so
+usr/lib/*/pkgconfig
diff --git a/.obs/debian/libopenconnect5.install b/.obs/debian/libopenconnect5.install
new file mode 100644 (file)
index 0000000..2cf7597
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/*/libopenconnect.so.*
diff --git a/.obs/debian/openconnect.install b/.obs/debian/openconnect.install
new file mode 100644 (file)
index 0000000..38bd42d
--- /dev/null
@@ -0,0 +1,7 @@
+usr/libexec/openconnect/*.py
+usr/libexec/openconnect/*.sh
+usr/sbin
+usr/share/bash-completion
+usr/share/doc/openconnect/html
+usr/share/locale
+usr/share/man
diff --git a/.obs/debian/rules b/.obs/debian/rules
new file mode 100755 (executable)
index 0000000..27a2b81
--- /dev/null
@@ -0,0 +1,24 @@
+#!/usr/bin/make -f
+
+include /usr/share/dpkg/pkg-info.mk
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+%:
+       dh $@
+
+override_dh_auto_configure:
+       dh_auto_configure -- \
+               --disable-dsa-tests \
+               --htmldir=/usr/share/doc/openconnect/html \
+               --with-gnutls \
+               --without-gnutls-version-check \
+               --with-vpnc-script=/usr/share/vpnc-scripts/vpnc-script
+       $(MAKE) version.c
+       sed -i -e 's|".*"|"v$(DEB_VERSION)"|' version.c
+
+override_dh_installchangelogs:
+       dh_installchangelogs www/changelog.html
+
+override_dh_compress:
+       dh_compress -Xhtml/changelog.html
diff --git a/.obs/openconnect.dsc b/.obs/openconnect.dsc
new file mode 100644 (file)
index 0000000..ac7914c
--- /dev/null
@@ -0,0 +1,20 @@
+Format: 1.0
+Source: openconnect
+Binary: openconnect, libopenconnect-dev, libopenconnect5
+Architecture: any
+Version: 8.20-0
+Maintainer: OpenConnect Team <openconnect-devel@lists.infradead.org>
+Homepage: https://www.infradead.org/openconnect/
+Standards-Version: 4.6.0
+Build-Depends: debhelper-compat (= 12), groff, libgcrypt20-dev, libgnutls28-dev, libkrb5-dev, liblz4-dev, libp11-kit-dev, libpcsclite-dev, libproxy-dev, libsocket-wrapper [!hurd-i386] <!nocheck>, libstoken-dev, libtasn1-6-dev, libtss2-dev, libuid-wrapper [!alpha !hurd-i386 !kfreebsd-amd64 !kfreebsd-i386] <!nocheck>, libxml2-dev, locales-all <!nocheck>, ocserv [!hurd-i386 !kfreebsd-amd64 !kfreebsd-i386] <!nocheck>, openssl <!nocheck>, pkg-config, python3:any, softhsm2 [!hurd-i386] <!nocheck>, zlib1g-dev
+Package-List:
+ libopenconnect-dev deb libdevel optional arch=any
+ libopenconnect5 deb libs optional arch=any
+ openconnect deb net optional arch=any
+Checksums-Sha1:
+ 5518304b35d865bea3ea6cf927fa0e0e4dd5f08a 2651542 openconnect_8.20.tar.gz
+Checksums-Sha256:
+ c1452384c6f796baee45d4e919ae1bfc281d6c88862e1f646a2cc513fc44e58b 2651542 openconnect_8.20.orig.tar.gz
+Files:
+ 26218ee45fea950ebcc65be242f3eb42 2651542 openconnect_8.20.tar.gz
+DEBTRANSFORM-RELEASE: 1
diff --git a/.obs/openconnect.spec b/.obs/openconnect.spec
new file mode 100644 (file)
index 0000000..a55f6f6
--- /dev/null
@@ -0,0 +1,181 @@
+# RHEL6/7 still has ancient GnuTLS
+%if 0%{?rhel_version} > 0 && 0%{?rhel_version} < 800
+%define use_gnutls 0
+%else
+%define use_gnutls 1
+%endif
+
+# RHEL has no libproxy, and no %%make_install macro
+%if 0%{?rhel}
+%define use_libproxy 0
+%define make_install %{__make} install DESTDIR=%{?buildroot}
+%define use_tokens 0
+%else
+%define use_libproxy 1
+%define use_tokens 1
+%endif
+
+# Fedora has tss2-sys from F29 onwards, and RHEL from 9 onwards.
+%if 0%{?rhel_version} < 900
+%define use_tss2_esys 0
+%else
+%define use_tss2_esys 1
+%endif
+
+%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
+
+%define libname libopenconnect5
+Name:          openconnect
+Version:       8.20+git20220220
+Release:       0
+Summary:       Open client for SSL VPNs
+
+License:       LGPL-2.1
+URL:           https://www.infradead.org/openconnect.html
+Source0:    https://www.infradead.org/openconnect/download/%{name}-%{version}.tar.gz
+
+
+BuildRequires: pkgconfig(libxml-2.0) krb5-devel
+BuildRequires: autoconf automake libtool gettext
+%if !0%{?rhel_version} == 700
+BuildRequires: pkgconfig(liblz4) pkgconfig(libpcsclite)
+BuildRequires: pkgconfig(uid_wrapper) pkgconfig(socket_wrapper)
+%endif
+%if 0%{?fedora}
+BuildRequires:  pkgconfig(json-parser)
+%endif
+%if 0%{?fedora} || 0%{?suse_version} > 1500
+# SoftHSM doesn't install on EPEL8: https://bugzilla.redhat.com/show_bug.cgi?id=1829480
+BuildRequires:  softhsm
+%endif
+%if 0%{?fedora} || 0%{?rhel_version} >= 700
+Obsoletes:     openconnect-lib-compat < %{version}-%{release}
+Requires:      vpnc-script
+%else
+Requires:      vpnc
+%endif
+
+%if 0%{?fedora} || 0%{?suse_version}
+BuildRequires: pkgconfig(libp11) pkgconfig(p11-kit-1)
+%endif
+%if 0%{?fedora}
+BuildRequires: glibc-langpack-cs
+%endif
+%if %{use_gnutls}
+%if !0%{?rhel_version} == 700
+BuildRequires: trousers-devel
+%endif
+BuildRequires: pkgconfig(gnutls)
+%if !0%{?suse_version} == 1500
+BuildRequires: ocserv
+%endif
+%else
+BuildRequires: pkgconfig(openssl)
+%endif
+%if %{use_libproxy}
+BuildRequires: pkgconfig(libproxy-1.0)
+%endif
+%if %{use_tokens}
+BuildRequires:  pkgconfig(stoken) pkgconfig(libpskc)
+%endif
+%if %{use_tss2_esys}
+BuildRequires: pkgconfig(tss2-esys) pkgconfig(tss2-tctildr) pkgconfig(tss2-mu)
+# https://bugzilla.redhat.com/show_bug.cgi?id=1638961
+BuildRequires: libgcrypt-devel
+%if 0%{?fedora} > 32
+# Older versions of tss2-esys don't have the swtpm TCTI
+BuildRequires: swtpm swtpm-tools
+%endif
+%endif
+
+%description
+This package provides a multiprotocol VPN client for Cisco AnyConnect,
+Juniper SSL VPN / Pulse Connect Secure, and Palo Alto Networks GlobalProtect
+SSL VPN.
+
+%package -n %{libname}
+Summary:        Libraries for openconnect
+Group:          System/Libraries
+
+%description -n %{libname}
+This package provides libraries 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 package for OpenConnect VPN authentication tools
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+This package provides the core HTTP and authentication support from
+the OpenConnect VPN client, to be used by GUI authentication dialogs
+for NetworkManager etc.
+
+%prep
+%setup -q
+if [ ! -x configure ]; then
+    NOCONFIGURE=x ./autogen.sh
+fi
+
+%build
+%configure     --disable-dsa-tests \
+%if %{use_gnutls}
+%if 0%{?fedora} || 0%{?rhel_version} > 700
+               --with-default-gnutls-priority="@OPENCONNECT,SYSTEM" \
+%endif
+               --without-gnutls-version-check \
+%else
+               --with-openssl --without-openssl-version-check \
+%endif
+%if 0%{?rhel_version} == 0 || 0%{?rhel_version} >= 800
+               --htmldir=%{_pkgdocdir} \
+%else
+               --disable-docs \
+%endif
+               --with-vpnc-script=/etc/vpnc/vpnc-script
+make %{?_smp_mflags} V=1
+
+
+%install
+%make_install
+mkdir -p $RPM_BUILD_ROOT/%{_pkgdocdir}
+rm -f $RPM_BUILD_ROOT/%{_libdir}/libopenconnect.la
+rm -f $RPM_BUILD_ROOT/%{_libexecdir}/openconnect/tncc-wrapper.py
+rm -f $RPM_BUILD_ROOT/%{_libexecdir}/openconnect/hipreport-android.sh
+%find_lang %{name}
+
+%check
+%if 0%{?fedora} || 0%{?rhel_version} > 700
+# Clear RDRAND capability bit to work around
+# https://bugzilla.redhat.com/show_bug.cgi?id=1831086
+make VERBOSE=1 OPENSSL_ia32cap=~0x4000000000000000 XFAIL_TESTS="obsolete-server-crypto" check
+%else
+# Test setup for OpenSSL builds in RHEL6.
+make VERBOSE=1 XFAIL_TESTS="auth-nonascii bad_dtls_test" check
+%endif
+
+%files -f %{name}.lang
+%{_sbindir}/openconnect
+%{_libexecdir}/openconnect/
+%{_mandir}/man8/*
+%{_datadir}/bash-completion/completions/openconnect
+%doc TODO COPYING.LGPL
+%doc %{_pkgdocdir}
+
+%post -n %{libname} -p /sbin/ldconfig
+%postun -n %{libname} -p /sbin/ldconfig
+
+%files -n %{libname}
+%{_libdir}/libopenconnect.so.*
+
+%files devel
+%{_libdir}/libopenconnect.so
+%{_includedir}/openconnect.h
+%{_libdir}/pkgconfig/openconnect.pc
+
+%changelog
+* Wed Feb 23 2022 OpenConnect Team <openconnect-devel@lists.infradead.org> - %{version}-%{release}
+- Adapt for SUSE builds for OBS
+* Tue Jul 16 2019 David Woodhouse <dwmw2@infradead.org> - %{version}-%{release}
+- Autopackaging for COPR