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.

88 lines
2.5 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.7
  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:=79c00132c3366bb60546f256068211eb
  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:= +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. define Package/ocserv/conffiles
  56. /etc/config/ocserv
  57. endef
  58. define Package/ocserv/install
  59. $(INSTALL_DIR) $(1)/usr/sbin
  60. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocserv $(1)/usr/sbin/
  61. $(INSTALL_DIR) $(1)/usr/bin
  62. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocpasswd $(1)/usr/bin/
  63. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/occtl $(1)/usr/bin/
  64. $(INSTALL_BIN) ./files/ocserv-script $(1)/usr/bin/
  65. $(INSTALL_DIR) $(1)/etc/init.d
  66. $(INSTALL_BIN) ./files/ocserv.init $(1)/etc/init.d/ocserv
  67. $(INSTALL_DIR) $(1)/etc/ocserv
  68. $(INSTALL_CONF) ./files/ocserv.conf.template $(1)/etc/ocserv/ocserv.conf.template
  69. $(INSTALL_DIR) $(1)/etc/config
  70. $(INSTALL_CONF) ./files/config $(1)/etc/config/ocserv
  71. endef
  72. $(eval $(call BuildPackage,ocserv))