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
:=32ce2c2a00a97ab7c27e571aae207b2d
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)/" \
61 --with-libcrypt-prefix
="$(STAGING_DIR)/" \
63 ifneq ($(CONFIG_OCSERV_PAM
),y
)
64 CONFIGURE_ARGS
+= --without-pam
67 ifneq ($(CONFIG_OCSERV_SECCOMP
),y
)
68 CONFIGURE_ARGS
+= --disable-seccomp
71 ifneq ($(CONFIG_OCSERV_PROTOBUF
),y
)
72 CONFIGURE_ARGS
+= --without-protobuf
75 ifneq ($(CONFIG_OCSERV_HTTP_PARSER
),y
)
76 CONFIGURE_ARGS
+= --without-http-parser
79 define Package
/ocserv
/conffiles
83 define Package
/ocserv
/install
84 $(INSTALL_DIR
) $(1)/usr
/sbin
85 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/ocserv
$(1)/usr
/sbin
/
86 $(INSTALL_DIR
) $(1)/usr
/bin
87 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/ocpasswd
$(1)/usr
/bin
/
88 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/occtl
$(1)/usr
/bin
/
89 $(INSTALL_BIN
) .
/files
/ocserv-script
$(1)/usr
/bin
/
90 $(INSTALL_DIR
) $(1)/etc
/init.d
91 $(INSTALL_BIN
) .
/files
/ocserv.init
$(1)/etc
/init.d
/ocserv
92 $(INSTALL_DIR
) $(1)/etc
/ocserv
93 $(INSTALL_CONF
) .
/files
/ocserv.conf.template
$(1)/etc
/ocserv
/ocserv.conf.template
94 $(INSTALL_DIR
) $(1)/etc
/config
95 $(INSTALL_CONF
) .
/files
/config
$(1)/etc
/config
/ocserv
96 $(INSTALL_DIR
) $(1)/lib
/upgrade
/keep.d
97 $(INSTALL_DATA
) .
/files
/ocserv.upgrade
$(1)/lib
/upgrade
/keep.d
/ocserv
100 $(eval
$(call BuildPackage
,ocserv
))