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.

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