[packages/openconnect] - updated to 5.00 - build with oath and stoken support by default - current openssl version from Th
qboosh
qboosh at pld-linux.org
Sat May 25 21:38:17 CEST 2013
commit 059c89fa1462c02e680020de16ad5d70e75ad048
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat May 25 21:38:43 2013 +0200
- updated to 5.00
- build with oath and stoken support by default
- current openssl version from Th is incompatible with this package, so use GnuTLS
- added link patch to avoid unnecessary linking with libtspi
openconnect-Makefile.patch | 50 ----------------------------------------------
openconnect-link.patch | 21 +++++++++++++++++++
openconnect.spec | 27 +++++++++++++++++++------
3 files changed, 42 insertions(+), 56 deletions(-)
---
diff --git a/openconnect.spec b/openconnect.spec
index ee1e6e9..f94dc8c 100644
--- a/openconnect.spec
+++ b/openconnect.spec
@@ -1,24 +1,32 @@
#
# 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)
@@ -34,9 +42,11 @@ Summary: Development files for OpenConnect library
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
@@ -60,6 +70,7 @@ Statyczna biblioteka OpenConnect.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%build
%{__libtoolize}
@@ -69,7 +80,10 @@ Statyczna biblioteka OpenConnect.
%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
@@ -102,6 +116,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/libopenconnect.so
%{_includedir}/openconnect.h
%{_pkgconfigdir}/openconnect.pc
+%{_docdir}/openconnect
%if %{with static_libs}
%files static
diff --git a/openconnect-Makefile.patch b/openconnect-Makefile.patch
deleted file mode 100644
index dd2df5a..0000000
--- a/openconnect-Makefile.patch
+++ /dev/null
@@ -1,50 +0,0 @@
---- 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
diff --git a/openconnect-link.patch b/openconnect-link.patch
new file mode 100644
index 0000000..f475a90
--- /dev/null
+++ b/openconnect-link.patch
@@ -0,0 +1,21 @@
+--- 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
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/openconnect.git/commitdiff/059c89fa1462c02e680020de16ad5d70e75ad048
More information about the pld-cvs-commit
mailing list