Merge pull request #23047 from neheb/fu
[feed/packages.git] / net / openconnect / Makefile
1 #
2 # Copyright (C) 2006-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=openconnect
11 PKG_VERSION:=9.12
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://www.infradead.org/openconnect/download
16 PKG_HASH:=a2bedce3aa4dfe75e36e407e48e8e8bc91d46def5335ac9564fbf91bd4b2413e
17
18 PKG_LICENSE:=LGPL-2.1-or-later
19 PKG_LICENSE_FILES:=COPYING.LGPL
20 PKG_CPE_ID:=cpe:/a:infradead:openconnect
21
22 PKG_CONFIG_DEPENDS:= \
23 CONFIG_OPENCONNECT_GNUTLS \
24 CONFIG_OPENCONNECT_OPENSSL \
25
26 PKG_BUILD_FLAGS:=no-mips16
27
28 include $(INCLUDE_DIR)/package.mk
29 include $(INCLUDE_DIR)/nls.mk
30
31 define Package/openconnect/config
32 source "$(SOURCE)/Config.in"
33 endef
34
35 define Package/openconnect
36 SECTION:=net
37 CATEGORY:=Network
38 DEPENDS:=+libxml2 +kmod-tun +resolveip +vpnc-scripts +OPENCONNECT_OPENSSL:libopenssl +OPENCONNECT_OPENSSL:p11-kit +OPENCONNECT_OPENSSL:libp11 +OPENCONNECT_GNUTLS:libgnutls +OPENCONNECT_GNUTLS:libtasn1 +OPENCONNECT_STOKEN:libstoken $(ICONV_DEPENDS) $(INTL_DEPENDS)
39 TITLE:=OpenConnect VPN client (Cisco AnyConnect and Juniper/Pulse compatible)
40 MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
41 URL:=https://www.infradead.org/openconnect/
42 SUBMENU:=VPN
43 endef
44
45 define Package/openconnect/description
46 A VPN client compatible with several SSL VPN implementations (ocserv, Cisco AnyConnect, Juniper, Palo Alto)
47
48 OpenConnect is an SSL VPN client initially created to support Cisco's
49 AnyConnect SSL VPN. It has since been extended to support the Pulse Connect
50 Secure VPN (formerly known as Juniper Network Connect or Junos Pulse) and
51 the Palo Alto Networks GlobalProtect SSL VPN.
52
53 A corresponding OpenConnect VPN server implementation can be found in the
54 ocserv package.
55 endef
56
57 CONFIGURE_ARGS += \
58 --disable-shared \
59 --with-libiconv-prefix=$(ICONV_PREFIX) \
60 --with-libintl-prefix=$(INTL_PREFIX) \
61 --with-vpnc-script=/lib/netifd/vpnc-script \
62 --without-libpcsclite \
63 --without-stoken \
64 --without-libpskc \
65 --without-gssapi \
66 --without-lz4
67
68 ifeq ($(CONFIG_OPENCONNECT_OPENSSL),y)
69 CONFIGURE_ARGS += \
70 --without-gnutls
71 endif
72
73 ifeq ($(CONFIG_OPENCONNECT_STOKEN),y)
74 CONFIGURE_ARGS += \
75 --with-stoken
76 endif
77
78 define Package/openconnect/install
79 $(INSTALL_DIR) $(1)/etc/openconnect/
80 $(INSTALL_DIR) $(1)/lib/netifd/proto
81 $(INSTALL_BIN) ./files/openconnect.sh $(1)/lib/netifd/proto/
82 $(INSTALL_DIR) $(1)/usr/sbin
83 $(INSTALL_BIN) $(PKG_BUILD_DIR)/openconnect $(1)/usr/sbin/
84 $(INSTALL_BIN) ./files/openconnect-wrapper $(1)/usr/sbin/
85 $(INSTALL_DIR) $(1)/lib/upgrade/keep.d
86 $(INSTALL_DATA) ./files/openconnect.upgrade $(1)/lib/upgrade/keep.d/openconnect
87 endef
88
89 $(eval $(call BuildPackage,openconnect))