You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
2.4 KiB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=ocserv
  9. PKG_VERSION:=0.8.6
  10. PKG_RELEASE:=1
  11. PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  13. PKG_SOURCE_URL :=ftp://ftp.infradead.org/pub/ocserv/
  14. PKG_MD5SUM:=78301874643ae658d43a8c7f4aaabadb
  15. PKG_LICENSE:=GPLv2
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_FIXUP:=autoreconf
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/ocserv/config
  20. source "$(SOURCE)/Config.in"
  21. endef
  22. define Package/ocserv
  23. SECTION:=net
  24. CATEGORY:=Network
  25. SUBMENU:=VPN
  26. TITLE:=OpenConnect VPN server
  27. URL:=http://www.infradead.org/ocserv/
  28. MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
  29. DEPENDS:= +libgnutls +certtool +libncurses +libreadline +OCSERV_PAM:libpam +OCSERV_PROTOBUF:libprotobuf-c
  30. USERID:=ocserv=72:ocserv=72
  31. endef
  32. define Package/ocserv/description
  33. OpenConnect server (ocserv) is an SSL VPN server. Its purpose is to be
  34. a secure, small, fast and configurable VPN server. It implements the
  35. OpenConnect SSL VPN protocol, and has also (currently experimental)
  36. compatibility with clients using the AnyConnect SSL VPN protocol. The
  37. OpenConnect VPN protocol uses the standard IETF security protocols such
  38. as TLS 1.2, and Datagram TLS to provide the secure VPN service.
  39. endef
  40. EXTRA_CPPFLAGS+=-I$(STAGING_DIR)/usr/include/readline/
  41. EXTRA_LDFLAGS+=-lncurses
  42. CONFIGURE_ARGS+= \
  43. --enable-local-libopts \
  44. --with-libreadline-prefix="$(STAGING_DIR)/" \
  45. --without-libnl \
  46. ifneq ($(CONFIG_OCSERV_PAM),y)
  47. CONFIGURE_ARGS += --without-pam
  48. endif
  49. ifneq ($(CONFIG_OCSERV_PROTOBUF),y)
  50. CONFIGURE_ARGS += --without-protobuf
  51. endif
  52. define Package/ocserv/conffiles
  53. /etc/config/ocserv
  54. endef
  55. define Package/ocserv/install
  56. $(INSTALL_DIR) $(1)/usr/sbin
  57. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocserv $(1)/usr/sbin/
  58. $(INSTALL_DIR) $(1)/usr/bin
  59. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocpasswd $(1)/usr/bin/
  60. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/occtl $(1)/usr/bin/
  61. $(INSTALL_BIN) ./files/ocserv-script $(1)/usr/bin/
  62. $(INSTALL_DIR) $(1)/etc/init.d
  63. $(INSTALL_BIN) ./files/ocserv.init $(1)/etc/init.d/ocserv
  64. $(INSTALL_DIR) $(1)/etc/ocserv
  65. $(INSTALL_CONF) ./files/ocserv.conf.template $(1)/etc/ocserv/ocserv.conf.template
  66. $(INSTALL_DIR) $(1)/etc/config
  67. $(INSTALL_CONF) ./files/config $(1)/etc/config/ocserv
  68. endef
  69. $(eval $(call BuildPackage,ocserv))