]>
Commit | Line | Data |
---|---|---|
eeff1512 JB |
1 | # |
2 | # Conditional build: | |
b22b36f2 JB |
3 | %bcond_without java # JNI bindings |
4 | %bcond_without kerberos5 # GSSAPI support | |
059c89fa JB |
5 | %bcond_with openssl # OpenSSL instead of GnuTLS (incompatible with some versions) |
6 | %bcond_without oath # OATH-based one-time password authentication | |
b22b36f2 | 7 | %bcond_without pcsc # Yutoken support via PCSC Lite |
059c89fa | 8 | %bcond_without stoken # Software Token authentication |
eeff1512 JB |
9 | %bcond_without static_libs # static library |
10 | # | |
68b16813 AO |
11 | Summary: Client for Cisco's AnyConnect SSL VPN and Pulse Connect Secure |
12 | Summary(pl.UTF-8): Klient Cisco AnyConnect SSL VPN i Pulse Connect Secure | |
8faeaf3f | 13 | Name: openconnect |
83539a72 | 14 | Version: 8.20 |
cb956be0 | 15 | Release: 1 |
eeff1512 JB |
16 | License: LGPL v2.1 |
17 | Group: Applications/Networking | |
8faeaf3f | 18 | Source0: ftp://ftp.infradead.org/pub/openconnect/%{name}-%{version}.tar.gz |
83539a72 | 19 | # Source0-md5: 26218ee45fea950ebcc65be242f3eb42 |
d0d38427 | 20 | Patch0: %{name}-am.patch |
ae9177b3 | 21 | Patch1: %{name}-x32.patch |
8faeaf3f | 22 | URL: http://www.infradead.org/openconnect.html |
63d08877 BZ |
23 | BuildRequires: autoconf >= 2.63 |
24 | BuildRequires: automake >= 1:1.10 | |
83539a72 | 25 | %{!?with_openssl:BuildRequires: gnutls-devel >= 3.6.13} |
b22b36f2 JB |
26 | BuildRequires: groff |
27 | %{?with_kerberos5:BuildRequires: heimdal-devel} | |
28 | %{?with_java:BuildRequires: jdk} | |
734b82cd | 29 | %{?with_openssl:BuildRequires: libp11-devel >= 0.4.8} |
14fb1dbd | 30 | BuildRequires: libproxy-devel |
734b82cd | 31 | %{!?with_openssl:BuildRequires: libtasn1-devel} |
eeff1512 | 32 | BuildRequires: libxml2-devel >= 2.0 |
b16cfe45 | 33 | BuildRequires: lz4-devel >= 1:1.7 |
b22b36f2 | 34 | %{?with_oath:BuildRequires: oath-toolkit-devel >= 2.2.0} |
059c89fa | 35 | %{?with_openssl:BuildRequires: openssl-devel} |
734b82cd | 36 | BuildRequires: p11-kit-devel |
b22b36f2 | 37 | %{?with_pcsc:BuildRequires: pcsc-lite-devel} |
059c89fa | 38 | BuildRequires: pkgconfig >= 1:0.27 |
b22b36f2 | 39 | BuildRequires: python >= 2 |
059c89fa | 40 | %{?with_stoken:BuildRequires: stoken-devel} |
734b82cd | 41 | %{!?with_openssl:BuildRequires: tpm2-tss-devel} |
aa47a45d | 42 | %{!?with_openssl:BuildRequires: trousers-devel} |
eeff1512 | 43 | BuildRequires: zlib-devel |
83539a72 | 44 | %{!?with_openssl:Requires: gnutls >= 3.6.13} |
b22b36f2 | 45 | %{?with_oath:Requires: oath-toolkit >= 2.2.0} |
a550ede0 | 46 | Suggests: vpnc-script |
8faeaf3f MB |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
48 | ||
49 | %description | |
6c2d6645 JB |
50 | OpenConnect is a client for Cisco's AnyConnect SSL VPN and Pulse |
51 | Connect Secure. | |
8faeaf3f | 52 | |
14fb1dbd | 53 | %description -l pl.UTF-8 |
6c2d6645 JB |
54 | OpenConnect jest klientem Cisco AnyConnect SSL VPN i Pulse Connect |
55 | Secure. | |
14fb1dbd MB |
56 | |
57 | %package devel | |
eeff1512 JB |
58 | Summary: Development files for OpenConnect library |
59 | Summary(pl.UTF-8): Pliki programistyczne biblioteki OpenConnect | |
14fb1dbd | 60 | Group: Development/Libraries |
63d08877 | 61 | Requires: %{name} = %{version}-%{release} |
83539a72 | 62 | %{?with_openssl:Requires: gnutls-devel >= 3.6.13} |
14fb1dbd | 63 | Requires: libproxy-devel |
eeff1512 | 64 | Requires: libxml2-devel >= 2.0 |
b22b36f2 | 65 | %{?with_oath:Requires: oath-toolkit-devel >= 2.2.0} |
059c89fa JB |
66 | %{?with_openssl:Requires: openssl-devel} |
67 | %{!?with_openssl:Requires: p11-kit-devel} | |
aa47a45d | 68 | %{?with_stoken:Requires: stoken-devel} |
14fb1dbd MB |
69 | Requires: zlib-devel |
70 | ||
71 | %description devel | |
eeff1512 | 72 | Development files for OpenConnect library. |
14fb1dbd MB |
73 | |
74 | %description devel -l pl.UTF-8 | |
eeff1512 JB |
75 | Pliki programistyczne biblioteki OpenConnect. |
76 | ||
77 | %package static | |
78 | Summary: Static OpenConnect library | |
79 | Summary(pl.UTF-8): Statyczna biblioteka OpenConnect | |
80 | Group: Development/Libraries | |
81 | Requires: %{name}-devel = %{version}-%{release} | |
82 | ||
83 | %description static | |
84 | Static OpenConnect library. | |
85 | ||
86 | %description static -l pl.UTF-8 | |
87 | Statyczna biblioteka OpenConnect. | |
14fb1dbd | 88 | |
b22b36f2 JB |
89 | %package -n java-openconnect |
90 | Summary: JNI wrapper for OpenConnect library | |
91 | Summary(pl.UTF-8): Interfejs JNI do biblioteki OpenConnect | |
92 | Group: Libraries/Java | |
93 | Requires: %{name} = %{version}-%{release} | |
94 | ||
95 | %description -n java-openconnect | |
96 | JNI wrapper for OpenConnect library. | |
97 | ||
98 | %description -n java-openconnect -l pl.UTF-8 | |
99 | Interfejs JNI do biblioteki OpenConnect. | |
100 | ||
734b82cd JB |
101 | %package -n bash-completion-openconnect |
102 | Summary: Bash completion for openconnect arguments | |
103 | Summary(pl.UTF-8): Bashowe dopełnianie argumentów polecenia openconnect | |
104 | Group: Applications/Shells | |
105 | Requires: %{name} = %{version}-%{release} | |
e0fbfaa6 | 106 | Requires: bash-completion >= 2.0 |
734b82cd | 107 | BuildArch: noarch |
734b82cd JB |
108 | |
109 | %description -n bash-completion-openconnect | |
110 | Bash completion for openconnect arguments. | |
111 | ||
112 | %description -n bash-completion-openconnect -l pl.UTF-8 | |
113 | Bashowe dopełnianie argumentów polecenia openconnect. | |
114 | ||
8faeaf3f MB |
115 | %prep |
116 | %setup -q | |
d0d38427 | 117 | %patch0 -p1 |
ae9177b3 | 118 | %patch1 -p1 |
8faeaf3f MB |
119 | |
120 | %build | |
63d08877 | 121 | %{__libtoolize} |
b42ab3fb | 122 | %{__aclocal} -I m4 |
63d08877 | 123 | %{__autoconf} |
b42ab3fb | 124 | %{__autoheader} |
63d08877 | 125 | %{__automake} |
eeff1512 | 126 | %configure \ |
d0d38427 | 127 | --disable-silent-rules \ |
a550ede0 | 128 | %{?with_static_libs:--enable-static} \ |
b22b36f2 JB |
129 | %{!?with_kerberos5:--without-gssapi} \ |
130 | %{?with_java:--with-java} \ | |
b22b36f2 | 131 | %{!?with_pcsc:--without-libpcsclite} \ |
734b82cd | 132 | %{!?with_oath:--without-libpskc} \ |
059c89fa | 133 | %{!?with_stoken:--without-stoken} \ |
665494d7 | 134 | --with-system-cafile=/etc/certs/ca-certificates.crt \ |
059c89fa JB |
135 | --with-vpnc-script=/usr/bin/vpnc-script \ |
136 | %{?with_openssl:--without-gnutls} | |
eeff1512 | 137 | %{__make} |
8faeaf3f MB |
138 | |
139 | %install | |
140 | rm -rf $RPM_BUILD_ROOT | |
8faeaf3f | 141 | |
63d08877 | 142 | %{__make} install \ |
8faeaf3f MB |
143 | DESTDIR=$RPM_BUILD_ROOT |
144 | ||
eeff1512 JB |
145 | # obsoleted by pkg-config |
146 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libopenconnect.la | |
b22b36f2 | 147 | # JNI module |
86acfad5 | 148 | %if %{with java} |
605e70f8 JP |
149 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libopenconnect-wrapper.la |
150 | %if %{with static_libs} | |
151 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libopenconnect-wrapper.a | |
152 | %endif | |
86acfad5 | 153 | %endif |
eeff1512 | 154 | |
494bb7e0 JB |
155 | # uses non-Linux /system/bin/sh |
156 | %{__rm} $RPM_BUILD_ROOT%{_libexecdir}/openconnect/hipreport-android.sh | |
157 | ||
0e0edc27 JB |
158 | %find_lang %{name} |
159 | ||
8faeaf3f MB |
160 | %clean |
161 | rm -rf $RPM_BUILD_ROOT | |
162 | ||
63d08877 BZ |
163 | %post -p /sbin/ldconfig |
164 | %postun -p /sbin/ldconfig | |
165 | ||
b22b36f2 JB |
166 | %post -n java-openconnect -p /sbin/ldconfig |
167 | %postun -n java-openconnect -p /sbin/ldconfig | |
168 | ||
0e0edc27 | 169 | %files -f %{name}.lang |
8faeaf3f | 170 | %defattr(644,root,root,755) |
63d08877 | 171 | %doc AUTHORS TODO |
70761f3a | 172 | %attr(755,root,root) %{_sbindir}/openconnect |
63d08877 | 173 | %attr(755,root,root) %{_libdir}/libopenconnect.so.*.*.* |
b22b36f2 | 174 | %attr(755,root,root) %ghost %{_libdir}/libopenconnect.so.5 |
734b82cd JB |
175 | %dir %{_libexecdir}/openconnect |
176 | %attr(755,root,root) %{_libexecdir}/openconnect/csd-post.sh | |
177 | %attr(755,root,root) %{_libexecdir}/openconnect/csd-wrapper.sh | |
734b82cd | 178 | %attr(755,root,root) %{_libexecdir}/openconnect/hipreport.sh |
e0fbfaa6 | 179 | %attr(755,root,root) %{_libexecdir}/openconnect/tncc-emulate.py |
734b82cd | 180 | %attr(755,root,root) %{_libexecdir}/openconnect/tncc-wrapper.py |
8faeaf3f | 181 | %{_mandir}/man8/openconnect.8* |
14fb1dbd MB |
182 | |
183 | %files devel | |
184 | %defattr(644,root,root,755) | |
63d08877 | 185 | %attr(755,root,root) %{_libdir}/libopenconnect.so |
14fb1dbd MB |
186 | %{_includedir}/openconnect.h |
187 | %{_pkgconfigdir}/openconnect.pc | |
059c89fa | 188 | %{_docdir}/openconnect |
eeff1512 JB |
189 | |
190 | %if %{with static_libs} | |
191 | %files static | |
192 | %defattr(644,root,root,755) | |
193 | %{_libdir}/libopenconnect.a | |
194 | %endif | |
b22b36f2 | 195 | |
86acfad5 | 196 | %if %{with java} |
b22b36f2 JB |
197 | %files -n java-openconnect |
198 | %defattr(644,root,root,755) | |
199 | %attr(755,root,root) %{_libdir}/libopenconnect-wrapper.so.*.*.* | |
200 | %attr(755,root,root) %ghost %{_libdir}/libopenconnect-wrapper.so.0 | |
201 | %attr(755,root,root) %{_libdir}/libopenconnect-wrapper.so | |
86acfad5 | 202 | %endif |
734b82cd JB |
203 | |
204 | %files -n bash-completion-openconnect | |
205 | %defattr(644,root,root,755) | |
e0fbfaa6 | 206 | %{bash_compdir}/openconnect |