ocserv: updated to 0.10.2
[feed/packages.git] / net / ocserv / Makefile
1 #
2 # Copyright (C) 2007-2011 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:=ocserv
11 PKG_VERSION:=0.10.2
12 PKG_RELEASE:=1
13
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
18
19 PKG_LICENSE:=GPLv2
20 PKG_LICENSE_FILES:=COPYING
21 PKG_FIXUP:=autoreconf
22
23 PKG_CONFIG_DEPENDS:= \
24 CONFIG_OCSERV_PAM \
25 CONFIG_OCSERV_SECCOMP \
26 CONFIG_OCSERV_PROTOBUF \
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/ocserv/config
31 source "$(SOURCE)/Config.in"
32 endef
33
34 define Package/ocserv
35 SECTION:=net
36 CATEGORY:=Network
37 SUBMENU:=VPN
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
43 endef
44
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.
52 endef
53
54 EXTRA_CPPFLAGS+=-I$(STAGING_DIR)/usr/include/readline/
55 EXTRA_LDFLAGS+=-lncurses
56
57 CONFIGURE_ARGS+= \
58 --enable-local-libopts \
59 --with-libreadline-prefix="$(STAGING_DIR)/" \
60 --without-libnl \
61 --with-libcrypt-prefix="$(STAGING_DIR)/" \
62
63 ifneq ($(CONFIG_OCSERV_PAM),y)
64 CONFIGURE_ARGS += --without-pam
65 endif
66
67 ifneq ($(CONFIG_OCSERV_SECCOMP),y)
68 CONFIGURE_ARGS += --disable-seccomp
69 endif
70
71 ifneq ($(CONFIG_OCSERV_PROTOBUF),y)
72 CONFIGURE_ARGS += --without-protobuf
73 endif
74
75 ifneq ($(CONFIG_OCSERV_HTTP_PARSER),y)
76 CONFIGURE_ARGS += --without-http-parser
77 endif
78
79 define Package/ocserv/conffiles
80 /etc/config/ocserv
81 endef
82
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
98 endef
99
100 $(eval $(call BuildPackage,ocserv))