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.

113 lines
3.3 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
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:=1.1.6
  10. PKG_RELEASE:=1
  11. PKG_USE_MIPS16:=0
  12. PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  14. PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/ocserv/
  15. PKG_HASH:=6a6cbe92212e32280426a51c634adc3d4803579dd049cfdb7e014714cc82c693
  16. PKG_LICENSE:=GPL-2.0-or-later
  17. PKG_LICENSE_FILES:=COPYING
  18. #PKG_FIXUP:=autoreconf
  19. PKG_CONFIG_DEPENDS:= \
  20. CONFIG_OCSERV_PAM \
  21. CONFIG_OCSERV_SECCOMP \
  22. CONFIG_OCSERV_PROTOBUF \
  23. include $(INCLUDE_DIR)/package.mk
  24. define Package/ocserv/config
  25. source "$(SOURCE)/Config.in"
  26. endef
  27. define Package/ocserv
  28. SECTION:=net
  29. CATEGORY:=Network
  30. SUBMENU:=VPN
  31. TITLE:=OpenConnect VPN server
  32. URL:=http://www.infradead.org/ocserv/
  33. MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
  34. DEPENDS:= +OCSERV_RADIUS:libradcli +OCSERV_HTTP_PARSER:libhttp-parser +OCSERV_SECCOMP:libseccomp +libgnutls +certtool +libncurses +libreadline +OCSERV_PAM:libpam +OCSERV_PROTOBUF:libprotobuf-c +libev +kmod-tun
  35. USERID:=ocserv=72:ocserv=72
  36. endef
  37. define Package/ocserv/description
  38. OpenConnect server (ocserv) is an SSL VPN server. Its purpose is to be
  39. a secure, small, fast and configurable VPN server. It implements the
  40. OpenConnect SSL VPN protocol, and has also (currently experimental)
  41. compatibility with clients using the AnyConnect SSL VPN protocol. The
  42. OpenConnect VPN protocol uses the standard IETF security protocols such
  43. as TLS 1.2, and Datagram TLS to provide the secure VPN service.
  44. endef
  45. EXTRA_CPPFLAGS+=-I$(STAGING_DIR)/usr/include/readline/
  46. EXTRA_LDFLAGS+=-lncurses
  47. CONFIGURE_VARS += \
  48. ac_cv_file__proc_self_exe=yes
  49. CONFIGURE_ARGS+= \
  50. --with-pager="" \
  51. --with-libreadline-prefix="$(STAGING_DIR)/" \
  52. --without-libnl \
  53. --without-gssapi \
  54. --with-libcrypt-prefix="$(STAGING_DIR)/" \
  55. --with-libev-prefix="$(STAGING_DIR)/" \
  56. --without-lz4 \
  57. --with-local-talloc \
  58. ifneq ($(CONFIG_OCSERV_PAM),y)
  59. CONFIGURE_ARGS += --without-pam
  60. endif
  61. ifneq ($(CONFIG_OCSERV_RADIUS),y)
  62. CONFIGURE_ARGS += --without-radius
  63. endif
  64. ifneq ($(CONFIG_OCSERV_SECCOMP),y)
  65. CONFIGURE_ARGS += --disable-seccomp
  66. endif
  67. ifneq ($(CONFIG_OCSERV_PROTOBUF),y)
  68. CONFIGURE_ARGS += --without-protobuf
  69. endif
  70. ifneq ($(CONFIG_OCSERV_HTTP_PARSER),y)
  71. CONFIGURE_ARGS += --without-http-parser
  72. endif
  73. define Package/ocserv/conffiles
  74. /etc/config/ocserv
  75. endef
  76. define Package/ocserv/install
  77. $(INSTALL_DIR) $(1)/usr/sbin
  78. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocserv $(1)/usr/sbin/
  79. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocserv-worker $(1)/usr/sbin/
  80. $(INSTALL_DIR) $(1)/usr/bin
  81. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocserv-fw $(1)/usr/bin/
  82. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocpasswd/ocpasswd $(1)/usr/bin/
  83. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/occtl/occtl $(1)/usr/bin/
  84. $(INSTALL_DIR) $(1)/etc/init.d
  85. $(INSTALL_BIN) ./files/ocserv.init $(1)/etc/init.d/ocserv
  86. $(INSTALL_DIR) $(1)/etc/ocserv
  87. $(INSTALL_CONF) ./files/ocserv.conf.template $(1)/etc/ocserv/ocserv.conf.template
  88. $(INSTALL_DIR) $(1)/etc/config
  89. $(INSTALL_CONF) ./files/config $(1)/etc/config/ocserv
  90. $(INSTALL_DIR) $(1)/lib/upgrade/keep.d
  91. $(INSTALL_DATA) ./files/ocserv.upgrade $(1)/lib/upgrade/keep.d/ocserv
  92. endef
  93. $(eval $(call BuildPackage,ocserv))