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
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
16 PKG_SOURCE_URL
:=ftp
://ftp.infradead.org
/pub
/ocserv
/
17 PKG_MD5SUM
:=6df31778642320ea7b90f314c4c9a897
20 PKG_LICENSE_FILES
:=COPYING
23 PKG_CONFIG_DEPENDS
:= \
25 CONFIG_OCSERV_SECCOMP \
26 CONFIG_OCSERV_PROTOBUF \
28 include $(INCLUDE_DIR
)/package.mk
30 define Package
/ocserv
/config
31 source
"$(SOURCE)/Config.in"
38 TITLE
:=OpenConnect VPN server
39 URL
:=http
://www.infradead.org
/ocserv
/
40 MAINTAINER
:=Nikos Mavrogiannopoulos
<n.mavrogiannopoulos@gmail.com
>
41 DEPENDS
:= +OCSERV_HTTP_PARSER
:libhttp-parser
+OCSERV_SECCOMP
:libseccomp
+libgnutls
+certtool
+libncurses
+libreadline
+OCSERV_PAM
:libpam
+OCSERV_PROTOBUF
:libprotobuf-c
+kmod-tun
42 USERID
:=ocserv
=72:ocserv
=72
45 define Package
/ocserv
/description
46 OpenConnect server
(ocserv
) is an SSL VPN server. Its purpose is to be
47 a secure
, small
, fast and configurable VPN server. It implements the
48 OpenConnect SSL VPN protocol
, and has also
(currently experimental
)
49 compatibility with clients using the AnyConnect SSL VPN protocol. The
50 OpenConnect VPN protocol uses the standard IETF security protocols such
51 as TLS
1.2, and Datagram TLS to provide the secure VPN service.
54 EXTRA_CPPFLAGS
+=-I
$(STAGING_DIR
)/usr
/include/readline
/
55 EXTRA_LDFLAGS
+=-lncurses
58 --enable-local-libopts \
59 --with-libreadline-prefix
="$(STAGING_DIR)/" \
62 --with-libcrypt-prefix
="$(STAGING_DIR)/" \
64 ifneq ($(CONFIG_OCSERV_PAM
),y
)
65 CONFIGURE_ARGS
+= --without-pam
68 ifneq ($(CONFIG_OCSERV_SECCOMP
),y
)
69 CONFIGURE_ARGS
+= --disable-seccomp
72 ifneq ($(CONFIG_OCSERV_PROTOBUF
),y
)
73 CONFIGURE_ARGS
+= --without-protobuf
76 ifneq ($(CONFIG_OCSERV_HTTP_PARSER
),y
)
77 CONFIGURE_ARGS
+= --without-http-parser
80 define Package
/ocserv
/conffiles
84 define Package
/ocserv
/install
85 $(INSTALL_DIR
) $(1)/usr
/sbin
86 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/ocserv
$(1)/usr
/sbin
/
87 $(INSTALL_DIR
) $(1)/usr
/bin
88 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/ocpasswd
$(1)/usr
/bin
/
89 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/occtl
$(1)/usr
/bin
/
90 $(INSTALL_BIN
) .
/files
/ocserv-script
$(1)/usr
/bin
/
91 $(INSTALL_DIR
) $(1)/etc
/init.d
92 $(INSTALL_BIN
) .
/files
/ocserv.init
$(1)/etc
/init.d
/ocserv
93 $(INSTALL_DIR
) $(1)/etc
/ocserv
94 $(INSTALL_CONF
) .
/files
/ocserv.conf.template
$(1)/etc
/ocserv
/ocserv.conf.template
95 $(INSTALL_DIR
) $(1)/etc
/config
96 $(INSTALL_CONF
) .
/files
/config
$(1)/etc
/config
/ocserv
97 $(INSTALL_DIR
) $(1)/lib
/upgrade
/keep.d
98 $(INSTALL_DATA
) .
/files
/ocserv.upgrade
$(1)/lib
/upgrade
/keep.d
/ocserv
101 $(eval
$(call BuildPackage
,ocserv
))