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.

83 lines
2.4 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 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.1
  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:=9a2eeafbe018128460df0729096b20c6
  15. PKG_LICENSE:=GPLv3
  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. endef
  31. define Package/ocserv/description
  32. OpenConnect server (ocserv) is an SSL VPN server. Its purpose is to be
  33. a secure, small, fast and configurable VPN server. It implements the
  34. OpenConnect SSL VPN protocol, and has also (currently experimental)
  35. compatibility with clients using the AnyConnect SSL VPN protocol. The
  36. OpenConnect VPN protocol uses the standard IETF security protocols such
  37. as TLS 1.2, and Datagram TLS to provide the secure VPN service.
  38. endef
  39. EXTRA_CPPFLAGS+=-I$(STAGING_DIR)/usr/include/readline/
  40. EXTRA_LDFLAGS+=-lncurses
  41. CONFIGURE_ARGS+= \
  42. --enable-local-libopts \
  43. --with-libreadline-prefix="$(STAGING_DIR)/" \
  44. --without-libnl \
  45. ifneq ($(CONFIG_OCSERV_PAM),y)
  46. CONFIGURE_ARGS += --without-pam
  47. endif
  48. ifneq ($(CONFIG_OCSERV_PROTOBUF),y)
  49. CONFIGURE_ARGS += --without-protobuf
  50. endif
  51. define Package/ocserv/conffiles
  52. /etc/config/ocserv
  53. endef
  54. define Package/ocserv/install
  55. $(INSTALL_DIR) $(1)/usr/sbin
  56. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocserv $(1)/usr/sbin/
  57. $(INSTALL_DIR) $(1)/usr/bin
  58. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocpasswd $(1)/usr/bin/
  59. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/occtl $(1)/usr/bin/
  60. $(INSTALL_BIN) ./files/ocserv-script $(1)/usr/bin/
  61. $(INSTALL_DIR) $(1)/etc/init.d
  62. $(INSTALL_BIN) ./files/ocserv.init $(1)/etc/init.d/ocserv
  63. $(INSTALL_DIR) $(1)/etc/ocserv
  64. $(INSTALL_CONF) ./files/ocserv.conf.template $(1)/etc/ocserv/ocserv.conf.template
  65. $(INSTALL_DIR) $(1)/etc/config
  66. $(INSTALL_CONF) ./files/config $(1)/etc/config/ocserv
  67. endef
  68. $(eval $(call BuildPackage,ocserv))