2 # Copyright (C) 2007-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
13 PKG_BUILD_FLAGS
:=no-mips16
15 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
17 PKG_SOURCE_URL
:=https
://www.infradead.org
/ocserv
/download
/
18 PKG_HASH
:=5c562c3ea1032065ef43d6075e5722f94ce6a7a780d6a2b4c6d54c1ce3921965
20 PKG_LICENSE
:=GPL-2.0
-or-later
21 PKG_LICENSE_FILES
:=COPYING
22 #PKG_FIXUP:=autoreconf
24 PKG_CONFIG_DEPENDS
:= \
26 CONFIG_OCSERV_SECCOMP \
27 CONFIG_OCSERV_PROTOBUF \
29 include $(INCLUDE_DIR
)/package.mk
31 define Package
/ocserv
/config
32 source
"$(SOURCE)/Config.in"
39 TITLE
:=OpenConnect VPN server
40 URL
:=http
://www.infradead.org
/ocserv
/
41 MAINTAINER
:=Nikos Mavrogiannopoulos
<n.mavrogiannopoulos@gmail.com
>
42 DEPENDS
:= +OCSERV_RADIUS
:libradcli
+OCSERV_SECCOMP
:libseccomp
+libgnutls
+certtool
+libncurses
+libreadline
+OCSERV_PAM
:libpam
+OCSERV_PROTOBUF
:libprotobuf-c
+OCSERV_LIBOATH
:liboath
+libev
+kmod-tun
43 USERID
:=ocserv
=72:ocserv
=72
46 define Package
/ocserv
/description
47 OpenConnect server
(ocserv
) is an SSL VPN server. Its purpose is to be
48 a secure
, small
, fast and configurable VPN server. It implements the
49 OpenConnect SSL VPN protocol
, and has also
(currently experimental
)
50 compatibility with clients using the AnyConnect SSL VPN protocol. The
51 OpenConnect VPN protocol uses the standard IETF security protocols such
52 as TLS
1.2, and Datagram TLS to provide the secure VPN service.
55 EXTRA_CPPFLAGS
+=-I
$(STAGING_DIR
)/usr
/include/readline
/
56 EXTRA_LDFLAGS
+=-lncurses
59 ac_cv_file__proc_self_exe
=yes \
60 ac_cv_prog_IPCALC
=/bin
/true
64 --with-libreadline-prefix
="$(STAGING_DIR)/" \
68 --with-libcrypt-prefix
="$(STAGING_DIR)/" \
69 --with-libev-prefix
="$(STAGING_DIR)/" \
73 ifneq ($(CONFIG_OCSERV_PAM
),y
)
74 CONFIGURE_ARGS
+= --without-pam
77 ifneq ($(CONFIG_OCSERV_RADIUS
),y
)
78 CONFIGURE_ARGS
+= --without-radius
81 ifneq ($(CONFIG_OCSERV_SECCOMP
),y
)
82 CONFIGURE_ARGS
+= --disable-seccomp
85 ifneq ($(CONFIG_OCSERV_PROTOBUF
),y
)
86 CONFIGURE_ARGS
+= --without-protobuf
89 ifndef CONFIG_OCSERV_LIBOATH
90 CONFIGURE_ARGS
+= --without-liboath
93 define Package
/ocserv
/conffiles
97 define Package
/ocserv
/install
98 $(INSTALL_DIR
) $(1)/usr
/sbin
99 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/ocserv
$(1)/usr
/sbin
/
100 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/ocserv-worker
$(1)/usr
/sbin
/
101 $(INSTALL_DIR
) $(1)/usr
/bin
102 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/ocserv-fw
$(1)/usr
/bin
/
103 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/ocpasswd
/ocpasswd
$(1)/usr
/bin
/
104 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/occtl
/occtl
$(1)/usr
/bin
/
105 $(INSTALL_DIR
) $(1)/etc
/init.d
106 $(INSTALL_BIN
) .
/files
/ocserv.init
$(1)/etc
/init.d
/ocserv
107 $(INSTALL_DIR
) $(1)/etc
/ocserv
108 $(INSTALL_CONF
) .
/files
/ocserv.conf.template
$(1)/etc
/ocserv
/ocserv.conf.template
109 $(INSTALL_DIR
) $(1)/etc
/config
110 $(INSTALL_CONF
) .
/files
/config
$(1)/etc
/config
/ocserv
111 $(INSTALL_DIR
) $(1)/lib
/upgrade
/keep.d
112 $(INSTALL_DATA
) .
/files
/ocserv.upgrade
$(1)/lib
/upgrade
/keep.d
/ocserv
115 $(eval
$(call BuildPackage
,ocserv
))