58e2f6f43dd317c7a1cd1134a9ae944095a4a6e6
[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.8.9
12 PKG_RELEASE:=3
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:=cd935cc89bffac75c825e66ef71f6a73
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_PROTOBUF \
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/ocserv/config
30 source "$(SOURCE)/Config.in"
31 endef
32
33 define Package/ocserv
34 SECTION:=net
35 CATEGORY:=Network
36 SUBMENU:=VPN
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 +kmod-tun
41 USERID:=ocserv=72:ocserv=72
42 endef
43
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.
51 endef
52
53 EXTRA_CPPFLAGS+=-I$(STAGING_DIR)/usr/include/readline/
54 EXTRA_LDFLAGS+=-lncurses
55
56 CONFIGURE_ARGS+= \
57 --enable-local-libopts \
58 --with-libreadline-prefix="$(STAGING_DIR)/" \
59 --without-libnl \
60
61 ifneq ($(CONFIG_OCSERV_PAM),y)
62 CONFIGURE_ARGS += --without-pam
63 endif
64
65 ifneq ($(CONFIG_OCSERV_PROTOBUF),y)
66 CONFIGURE_ARGS += --without-protobuf
67 endif
68
69 ifneq ($(CONFIG_OCSERV_HTTP_PARSER),y)
70 CONFIGURE_ARGS += --without-http-parser
71 endif
72
73 define Package/ocserv/conffiles
74 /etc/config/ocserv
75 endef
76
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
90 endef
91
92 $(eval $(call BuildPackage,ocserv))