+++ /dev/null
---- openconnect-3.02/Makefile.orig 2011-05-04 18:53:39.109630396 +0200
-+++ openconnect-3.02/Makefile 2011-05-04 17:45:05.059718203 +0200
-@@ -15,23 +15,23 @@ endif
- # dir; there's no need to install it anywhere (we link it statically).
- ifdef OPENSSL
- SSL_CFLAGS += -I$(OPENSSL)/include
--SSL_LDFLAGS += $(OPENSSL)/libssl.a $(OPENSSL)/libcrypto.a
-+SSL_LIBS += $(OPENSSL)/libssl.a $(OPENSSL)/libcrypto.a
- else
- SSL_CFLAGS += $(shell pkg-config --cflags libssl)
--SSL_LDFLAGS += $(shell pkg-config --libs libssl)
--ifeq ($(SSL_LDFLAGS),)
-+SSL_LIBS += $(shell pkg-config --libs libssl)
-+ifeq ($(SSL_LIBS),)
- $(error "No OpenSSL support. Cannot continue");
- endif
- endif
-
- XML2_CFLAGS += $(shell xml2-config --cflags)
--XML2_LDFLAGS += $(shell xml2-config --libs)
--ifeq ($(XML2_LDFLAGS),)
-+XML2_LIBS += $(shell xml2-config --libs)
-+ifeq ($(XML2_LIBS),)
- $(error "No libxml2 support. Cannot continue");
- endif
-
- CFLAGS := $(OPT_FLAGS) $(SSL_CFLAGS) $(XML2_CFLAGS) $(EXTRA_CFLAGS)
--LDFLAGS := -lz $(SSL_LDFLAGS) $(XML2_LDFLAGS) $(EXTRA_LDFLAGS)
-+LIBS := -lz $(SSL_LIBS) $(XML2_LIBS) $(EXTRA_LIBS)
-
- ifdef SSL_UI
- CFLAGS += -DSSL_UI
-@@ -45,7 +45,7 @@ endif
-
- ifneq ($(LIBPROXY_HDR),)
- CFLAGS += -DOPENCONNECT_LIBPROXY -DLIBPROXY_HDR=\"$(LIBPROXY_HDR)\"
--LDFLAGS += -lproxy
-+LIBS += -lproxy
- endif
-
- OPENCONNECT_OBJS := xml.o main.o $(SSL_UI)
-@@ -68,7 +68,7 @@ version.c: $(patsubst %.o,%.c,$(VERSION_
- @./version.sh
-
- openconnect: $(OPENCONNECT_OBJS) $(CONNECTION_OBJS) libopenconnect.a
-- $(CC) -o $@ $^ $(LDFLAGS)
-+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
-
- %.o: %.c
- $(CC) -c -o $@ $(CFLAGS) $(CFLAGS_$@) $< -MD -MF .$@.dep
--- /dev/null
+--- openconnect-5.00/configure.ac.orig 2013-05-15 22:14:32.000000000 +0200
++++ openconnect-5.00/configure.ac 2013-05-25 20:20:27.607437685 +0200
+@@ -326,18 +326,6 @@
+ AC_CHECK_FUNC(gnutls_pkcs11_add_provider,
+ [PKG_CHECK_MODULES(P11KIT, p11-kit-1, [AC_DEFINE(HAVE_P11KIT)
+ AC_SUBST(P11KIT_PC, p11-kit-1)], [:])], [])
+- LIBS="$oldlibs -ltspi"
+- AC_MSG_CHECKING([for tss library])
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([
+- #include <trousers/tss.h>
+- #include <trousers/trousers.h>],[
+- int err = Tspi_Context_Create((void *)0);
+- Trspi_Error_String(err);])],
+- [AC_MSG_RESULT(yes)
+- AC_SUBST([TSS_LIBS], [-ltspi])
+- AC_SUBST([TSS_CFLAGS], [])
+- AC_DEFINE(HAVE_TROUSERS, 1)],
+- [AC_MSG_RESULT(no)])
+ LIBS="$oldlibs"
+ CFLAGS="$oldcflags"
+ fi
#
# Conditional build:
+%bcond_with openssl # OpenSSL instead of GnuTLS (incompatible with some versions)
+%bcond_without oath # OATH-based one-time password authentication
+%bcond_without stoken # Software Token authentication
%bcond_without static_libs # static library
#
Summary: Client for Cisco's AnyConnect SSL VPN
Summary(pl.UTF-8): Klient Cisco AnyConnect SSL VPN
Name: openconnect
-Version: 4.07
+Version: 5.00
Release: 1
License: LGPL v2.1
Group: Applications/Networking
Source0: ftp://ftp.infradead.org/pub/openconnect/%{name}-%{version}.tar.gz
-# Source0-md5: 61f26e7936d8b26c0f7e8119b7ef84b2
+# Source0-md5: b3677a4b15f8c530615f4c42dadce275
Patch0: %{name}-am.patch
+Patch1: %{name}-link.patch
URL: http://www.infradead.org/openconnect.html
BuildRequires: autoconf >= 2.63
BuildRequires: automake >= 1:1.10
+%{!?with_openssl:BuildRequires: gnutls-devel >= 2.12.16}
BuildRequires: libproxy-devel
BuildRequires: libxml2-devel >= 2.0
-BuildRequires: openssl-devel
-BuildRequires: pkgconfig
+%{?with_oath:BuildRequires: oath-toolkit-devel}
+%{?with_openssl:BuildRequires: openssl-devel}
+%{!?with_openssl:BuildRequires: p11-kit-devel}
+BuildRequires: pkgconfig >= 1:0.27
+%{?with_stoken:BuildRequires: stoken-devel}
BuildRequires: zlib-devel
Suggests: vpnc-script
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Summary(pl.UTF-8): Pliki programistyczne biblioteki OpenConnect
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
+%{?with_openssl:Requires: gnutls-devel >= 2.12.16}
Requires: libproxy-devel
Requires: libxml2-devel >= 2.0
-Requires: openssl-devel
+%{?with_openssl:Requires: openssl-devel}
+%{!?with_openssl:Requires: p11-kit-devel}
Requires: zlib-devel
%description devel
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%build
%{__libtoolize}
%configure \
--disable-silent-rules \
%{?with_static_libs:--enable-static} \
- --with-vpnc-script=/usr/bin/vpnc-script
+ %{!?with_oath:--without-liboath} \
+ %{!?with_stoken:--without-stoken} \
+ --with-vpnc-script=/usr/bin/vpnc-script \
+ %{?with_openssl:--without-gnutls}
%{__make}
%install
%attr(755,root,root) %{_libdir}/libopenconnect.so
%{_includedir}/openconnect.h
%{_pkgconfigdir}/openconnect.pc
+%{_docdir}/openconnect
%if %{with static_libs}
%files static