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
:=d9b12a3fa976dfda3e4c0238173744e6
20 PKG_LICENSE_FILES
:=COPYING
23 PKG_CONFIG_DEPENDS
:= \
25 CONFIG_OCSERV_PROTOBUF \
27 include $(INCLUDE_DIR
)/package.mk
29 define Package
/ocserv
/config
30 source
"$(SOURCE)/Config.in"
37 TITLE
:=OpenConnect VPN server
38 URL
:=http
://www.infradead.org
/ocserv
/
39 MAINTAINER
:=Nikos Mavrogiannopoulos
<n.mavrogiannopoulos@gmail.com
>
40 DEPENDS
:= +OCSERV_HTTP_PARSER
:libhttp-parser
+libgnutls
+certtool
+libncurses
+libreadline
+OCSERV_PAM
:libpam
+OCSERV_PROTOBUF
:libprotobuf-c
41 USERID
:=ocserv
=72:ocserv
=72
44 define Package
/ocserv
/description
45 OpenConnect server
(ocserv
) is an SSL VPN server. Its purpose is to be
46 a secure
, small
, fast and configurable VPN server. It implements the
47 OpenConnect SSL VPN protocol
, and has also
(currently experimental
)
48 compatibility with clients using the AnyConnect SSL VPN protocol. The
49 OpenConnect VPN protocol uses the standard IETF security protocols such
50 as TLS
1.2, and Datagram TLS to provide the secure VPN service.
53 EXTRA_CPPFLAGS
+=-I
$(STAGING_DIR
)/usr
/include/readline
/
54 EXTRA_LDFLAGS
+=-lncurses
57 --enable-local-libopts \
58 --with-libreadline-prefix
="$(STAGING_DIR)/" \
61 ifneq ($(CONFIG_OCSERV_PAM
),y
)
62 CONFIGURE_ARGS
+= --without-pam
65 ifneq ($(CONFIG_OCSERV_PROTOBUF
),y
)
66 CONFIGURE_ARGS
+= --without-protobuf
69 ifneq ($(CONFIG_OCSERV_HTTP_PARSER
),y
)
70 CONFIGURE_ARGS
+= --without-http-parser
73 define Package
/ocserv
/conffiles
77 define Package
/ocserv
/install
78 $(INSTALL_DIR
) $(1)/usr
/sbin
79 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/ocserv
$(1)/usr
/sbin
/
80 $(INSTALL_DIR
) $(1)/usr
/bin
81 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/ocpasswd
$(1)/usr
/bin
/
82 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/occtl
$(1)/usr
/bin
/
83 $(INSTALL_BIN
) .
/files
/ocserv-script
$(1)/usr
/bin
/
84 $(INSTALL_DIR
) $(1)/etc
/init.d
85 $(INSTALL_BIN
) .
/files
/ocserv.init
$(1)/etc
/init.d
/ocserv
86 $(INSTALL_DIR
) $(1)/etc
/ocserv
87 $(INSTALL_CONF
) .
/files
/ocserv.conf.template
$(1)/etc
/ocserv
/ocserv.conf.template
88 $(INSTALL_DIR
) $(1)/etc
/config
89 $(INSTALL_CONF
) .
/files
/config
$(1)/etc
/config
/ocserv
92 $(eval
$(call BuildPackage
,ocserv
))