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.

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