Skip to content

Latest commit

 

History

History
157 lines (135 loc) · 4.17 KB

openconnect.spec.in

File metadata and controls

157 lines (135 loc) · 4.17 KB
 
Jul 16, 2019
Jul 16, 2019
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
%global gitsnapshot @ISSNAP@
%if 0%{?gitsnapshot}
%global snapcommit @SNAPCOMMIT@
%global snapcount @SNAPCOUNT@
%global shortcommit %(c=%{snapcommit}; echo ${c:0:7})
%global snapver .git.%{snapcount}.%{shortcommit}
%endif
%global tagver @VERSION@
# RHEL6 still has ancient GnuTLS
%define use_gnutls 0%{?fedora} || 0%{?rhel} >= 7
# RHEL5 has no libproxy, and no %%make_install macro
%if 0%{?rhel} && 0%{?rhel} <= 5
%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
Oct 3, 2019
Oct 3, 2019
24
# Fedora has tss2-sys from F29 onwards, and RHEL from 8 onwards.
Oct 14, 2019
Oct 14, 2019
25
%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8
Jul 16, 2019
Jul 16, 2019
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
%define use_tss2_esys 1
%else
%define use_tss2_esys 0
%endif
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
Name: openconnect
Version: %{tagver}%{?snapver}
Release: 0%{?dist}
Summary: Open client for Cisco AnyConnect VPN, Juniper Network Connect/Pulse, PAN GlobalProtect
License: LGPLv2
URL: http://www.infradead.org/openconnect.html
%if 0%{?gitsnapshot}
Source0: https://github.com/openconnect/%{name}/archive/%{snapcommit}/%{name}-%{shortcommit}.tar.gz
%else
Source0: ftp://ftp.infradead.org/pub/%{name}/%{name}-%{version}.tar.gz
%endif
Source2: gpgkey-BE07D9FD54809AB2C4B0FF5F63762CDA67E2F359.asc
Source3: macros.gpg
BuildRequires: pkgconfig(libxml-2.0) pkgconfig(libpcsclite) krb5-devel gnupg2
BuildRequires: autoconf automake libtool gettext pkgconfig(liblz4)
BuildRequires: pkgconfig(uid_wrapper) pkgconfig(socket_wrapper) softhsm
%if 0%{?fedora} || 0%{?rhel} >= 7
Obsoletes: openconnect-lib-compat < %{version}-%{release}
Requires: vpnc-script
%else
Requires: vpnc
%endif
%if 0%{?fedora} >= 30
BuildRequires: glibc-langpack-cs
%endif
%if %{use_gnutls}
BuildRequires: pkgconfig(gnutls) trousers-devel
# Anywhere we use GnuTLS ,there should be an ocserv package too
BuildRequires: ocserv
%else
BuildRequires: pkgconfig(openssl) pkgconfig(libp11) pkgconfig(p11-kit-1)
%endif
%if %{use_libproxy}
BuildRequires: pkgconfig(libproxy-1.0)
%endif
%if %{use_tokens}
BuildRequires: pkgconfig(stoken) pkgconfig(libpskc)
%endif
%if %{use_tss2_esys}
# https://bugzilla.redhat.com/show_bug.cgi?id=1638961
BuildRequires: pkgconfig(tss2-esys) libgcrypt-devel
%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 devel
Summary: Development package for OpenConnect VPN authentication tools
Requires: %{name}%{?_isa} = %{version}-%{release}
# RHEL5 needs these spelled out because it doesn't automatically infer from pkgconfig
%if 0%{?rhel} && 0%{?rhel} <= 5
Requires: openssl-devel zlib-devel
%endif
%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.
%include %SOURCE3
%prep
%if 0%{?gitsnapshot}
%setup -q -n %{name}-%{snapcommit}
NOCONFIGURE=x ./autogen.sh
%else
%gpg_verify
%setup -q
if [ ! -x configure ]; then
NOCONFIGURE=x ./autogen.sh
fi
%endif
%build
%configure --with-vpnc-script=/etc/vpnc/vpnc-script \
--disable-dsa-tests \
%if %{use_gnutls}
Oct 3, 2019
Oct 3, 2019
115
%if 0%{?fedora} || 0%{?rhel} > 8
Jul 16, 2019
Jul 16, 2019
116
--with-default-gnutls-priority="@OPENCONNECT,SYSTEM" \
Oct 3, 2019
Oct 3, 2019
117
%endif
Jul 16, 2019
Jul 16, 2019
118
119
120
121
122
123
124
125
126
127
128
129
%else
--with-openssl --without-openssl-version-check \
%endif
--htmldir=%{_pkgdocdir}
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
Aug 6, 2019
Aug 6, 2019
130
rm -f $RPM_BUILD_ROOT/%{_libexecdir}/openconnect/hipreport-android.sh
Jul 16, 2019
Jul 16, 2019
131
132
133
%find_lang %{name}
%check
Oct 3, 2019
Oct 3, 2019
134
%if 0%{?fedora} || 0%{?rhel} > 7
Jul 16, 2019
Jul 16, 2019
135
make VERBOSE=1 check
Oct 3, 2019
Oct 3, 2019
136
137
%else
make VERBOSE=1 XFAIL_TESTS="auth-nonascii bad_dtls_test" check
Jul 16, 2019
Jul 16, 2019
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
%endif
%ldconfig_scriptlets
%files -f %{name}.lang
%{_libdir}/libopenconnect.so.5*
%{_sbindir}/openconnect
%{_libexecdir}/openconnect/
%{_mandir}/man8/*
%doc TODO COPYING.LGPL
%doc %{_pkgdocdir}
%files devel
%{_libdir}/libopenconnect.so
%{_includedir}/openconnect.h
%{_libdir}/pkgconfig/openconnect.pc
%changelog
* Tue Jul 16 2019 David Woodhouse <dwmw2@infradead.org> - %{version}-%{release}
- Autopackaging for COPR