9925d340b4a62727ed2431b2858a1594ecb632f2
[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.4
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:=6df31778642320ea7b90f314c4c9a897
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 --without-gssapi \
62 --with-libcrypt-prefix="$(STAGING_DIR)/" \
63
64 ifneq ($(CONFIG_OCSERV_PAM),y)
65 CONFIGURE_ARGS += --without-pam
66 endif
67
68 ifneq ($(CONFIG_OCSERV_SECCOMP),y)
69 CONFIGURE_ARGS += --disable-seccomp
70 endif
71
72 ifneq ($(CONFIG_OCSERV_PROTOBUF),y)
73 CONFIGURE_ARGS += --without-protobuf
74 endif
75
76 ifneq ($(CONFIG_OCSERV_HTTP_PARSER),y)
77 CONFIGURE_ARGS += --without-http-parser
78 endif
79
80 define Package/ocserv/conffiles
81 /etc/config/ocserv
82 endef
83
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
99 endef
100
101 $(eval $(call BuildPackage,ocserv))