ocserv: fixed issue that caused the removal of ocserv-script.
[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.1
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:=9a2eeafbe018128460df0729096b20c6
18
19 PKG_LICENSE:=GPLv3
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 MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
36 DEPENDS:= +libgnutls +certtool +libncurses +libreadline +OCSERV_PAM:libpam +OCSERV_PROTOBUF:libprotobuf-c
37 endef
38
39 define Package/ocserv/description
40 OpenConnect server (ocserv) is an SSL VPN server. Its purpose is to be
41 a secure, small, fast and configurable VPN server. It implements the
42 OpenConnect SSL VPN protocol, and has also (currently experimental)
43 compatibility with clients using the AnyConnect SSL VPN protocol. The
44 OpenConnect VPN protocol uses the standard IETF security protocols such
45 as TLS 1.2, and Datagram TLS to provide the secure VPN service.
46 endef
47
48 EXTRA_CPPFLAGS+=-I$(STAGING_DIR)/usr/include/readline/
49 EXTRA_LDFLAGS+=-lncurses
50
51 CONFIGURE_ARGS+= \
52 --enable-local-libopts \
53 --with-libreadline-prefix="$(STAGING_DIR)/" \
54 --without-libnl \
55
56 ifneq ($(CONFIG_OCSERV_PAM),y)
57 CONFIGURE_ARGS += --without-pam
58 endif
59
60 ifneq ($(CONFIG_OCSERV_PROTOBUF),y)
61 CONFIGURE_ARGS += --without-protobuf
62 endif
63
64 define Package/ocserv/conffiles
65 /etc/config/ocserv
66 endef
67
68 define Package/ocserv/install
69 $(INSTALL_DIR) $(1)/usr/sbin
70 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocserv $(1)/usr/sbin/
71 $(INSTALL_DIR) $(1)/usr/bin
72 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocpasswd $(1)/usr/bin/
73 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/occtl $(1)/usr/bin/
74 $(INSTALL_BIN) ./files/ocserv-script $(1)/usr/bin/
75 $(INSTALL_DIR) $(1)/etc/init.d
76 $(INSTALL_BIN) ./files/ocserv.init $(1)/etc/init.d/ocserv
77 $(INSTALL_DIR) $(1)/etc/ocserv
78 $(INSTALL_CONF) ./files/ocserv.conf.template $(1)/etc/ocserv/ocserv.conf.template
79 $(INSTALL_DIR) $(1)/etc/config
80 $(INSTALL_CONF) ./files/config $(1)/etc/config/ocserv
81 endef
82
83 $(eval $(call BuildPackage,ocserv))