ocserv: Added ocserv 0.3.5, an SSL VPN server.
[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.3.5
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:=7ba8ebe4eba08b6e1c9dabbc78da16e5
18
19 PKG_LICENSE:=GPLv2
20 PKG_LICENSE_FILES:=COPYING
21 PKG_FIXUP:=autoreconf
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/ocserv/config
26         source "$(SOURCE)/Config.in"
27 endef
28
29 define Package/ocserv
30   SECTION:=net
31   CATEGORY:=Network
32   SUBMENU:=VPN
33   TITLE:=OpenConnect VPN server
34   URL:=http://www.infradead.org/ocserv/
35   DEPENDS:= +libgnutls +OCSERV_PAM:libpam +OCSERV_DBUS:libdbus +OCSERV_DBUS:libreadline +libprotobuf-c
36 endef
37
38 define Package/ocserv/description
39  OpenConnect server (ocserv) is an SSL VPN server. Its purpose is to be 
40  a secure, small, fast and configurable VPN server. It implements the
41  OpenConnect SSL VPN protocol, and has also (currently experimental)
42  compatibility with clients using the AnyConnect SSL VPN protocol. The
43  OpenConnect VPN protocol uses the standard IETF security protocols such
44  as TLS 1.2, and Datagram TLS to provide the secure VPN service. 
45 endef
46
47 CONFIGURE_ARGS+= \
48         --enable-local-libopts \
49         --with-libcrypt-prefix="$(STAGING_DIR)/include" \
50
51 ifneq ($(CONFIG_OCSERV_DBUS),y)
52 CONFIGURE_ARGS += --without-dbus
53 endif
54
55 ifneq ($(CONFIG_OCSERV_PAM),y)
56 CONFIGURE_ARGS += --without-pam
57 endif
58
59 define Package/ocserv/install
60         $(INSTALL_DIR) $(1)/usr/sbin
61         $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocserv $(1)/usr/sbin/
62         $(INSTALL_DIR) $(1)/usr/bin
63         $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocpasswd $(1)/usr/bin/
64         $(INSTALL_DIR) $(1)/etc/init.d
65         $(INSTALL_BIN) ./files/ocserv.init $(1)/etc/init.d/ocserv
66         $(INSTALL_DIR) $(1)/etc/ocserv
67         $(INSTALL_CONF) ./files/ocserv.conf $(1)/etc/ocserv/ocserv.conf
68 ifeq ($(CONFIG_OCSERV_DBUS),y)
69         $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/occtl $(1)/usr/bin/
70         $(INSTALL_DIR) $(1)/etc/dbus-1/system.d
71         $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/dbus/org.infradead.ocserv.conf $(1)/etc/dbus-1/system.d/
72 endif
73 endef
74
75 $(eval $(call BuildPackage,ocserv))