openwrt-packages/net/ocserv/Makefile

115 lines
3.3 KiB
Makefile
Raw Normal View History

2014-06-03 18:18:45 +02:00
#
# Copyright (C) 2007-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ocserv
PKG_VERSION:=1.1.6
PKG_RELEASE:=2
PKG_BUILD_FLAGS:=no-mips16
2014-06-03 18:18:45 +02:00
PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/ocserv/
PKG_HASH:=6a6cbe92212e32280426a51c634adc3d4803579dd049cfdb7e014714cc82c693
2014-06-03 18:18:45 +02:00
PKG_LICENSE:=GPL-2.0-or-later
2014-06-03 18:18:45 +02:00
PKG_LICENSE_FILES:=COPYING
#PKG_FIXUP:=autoreconf
2014-06-03 18:18:45 +02:00
PKG_CONFIG_DEPENDS:= \
CONFIG_OCSERV_PAM \
CONFIG_OCSERV_SECCOMP \
CONFIG_OCSERV_PROTOBUF \
2014-06-03 18:18:45 +02:00
include $(INCLUDE_DIR)/package.mk
define Package/ocserv/config
source "$(SOURCE)/Config.in"
endef
define Package/ocserv
SECTION:=net
CATEGORY:=Network
SUBMENU:=VPN
TITLE:=OpenConnect VPN server
URL:=http://www.infradead.org/ocserv/
MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
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
USERID:=ocserv=72:ocserv=72
2014-06-03 18:18:45 +02:00
endef
define Package/ocserv/description
2017-04-27 01:25:20 +02:00
OpenConnect server (ocserv) is an SSL VPN server. Its purpose is to be
2014-06-03 18:18:45 +02:00
a secure, small, fast and configurable VPN server. It implements the
OpenConnect SSL VPN protocol, and has also (currently experimental)
compatibility with clients using the AnyConnect SSL VPN protocol. The
OpenConnect VPN protocol uses the standard IETF security protocols such
2017-04-27 01:25:20 +02:00
as TLS 1.2, and Datagram TLS to provide the secure VPN service.
2014-06-03 18:18:45 +02:00
endef
EXTRA_CPPFLAGS+=-I$(STAGING_DIR)/usr/include/readline/
EXTRA_LDFLAGS+=-lncurses
2020-09-21 21:33:49 +02:00
CONFIGURE_VARS += \
ac_cv_file__proc_self_exe=yes
2014-06-03 18:18:45 +02:00
CONFIGURE_ARGS+= \
--with-pager="" \
2014-06-03 18:18:45 +02:00
--with-libreadline-prefix="$(STAGING_DIR)/" \
--without-libnl \
--without-gssapi \
--without-maxmind \
--with-libcrypt-prefix="$(STAGING_DIR)/" \
--with-libev-prefix="$(STAGING_DIR)/" \
--without-lz4 \
--with-local-talloc \
2014-06-03 18:18:45 +02:00
ifneq ($(CONFIG_OCSERV_PAM),y)
CONFIGURE_ARGS += --without-pam
endif
ifneq ($(CONFIG_OCSERV_RADIUS),y)
CONFIGURE_ARGS += --without-radius
endif
ifneq ($(CONFIG_OCSERV_SECCOMP),y)
CONFIGURE_ARGS += --disable-seccomp
endif
2014-06-03 18:18:45 +02:00
ifneq ($(CONFIG_OCSERV_PROTOBUF),y)
CONFIGURE_ARGS += --without-protobuf
endif
ifneq ($(CONFIG_OCSERV_HTTP_PARSER),y)
CONFIGURE_ARGS += --without-http-parser
endif
define Package/ocserv/conffiles
/etc/config/ocserv
endef
2014-06-03 18:18:45 +02:00
define Package/ocserv/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocserv $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocserv-worker $(1)/usr/sbin/
2014-06-03 18:18:45 +02:00
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocserv-fw $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocpasswd/ocpasswd $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/occtl/occtl $(1)/usr/bin/
2014-06-03 18:18:45 +02:00
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/ocserv.init $(1)/etc/init.d/ocserv
$(INSTALL_DIR) $(1)/etc/ocserv
$(INSTALL_CONF) ./files/ocserv.conf.template $(1)/etc/ocserv/ocserv.conf.template
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/config $(1)/etc/config/ocserv
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(INSTALL_DATA) ./files/ocserv.upgrade $(1)/lib/upgrade/keep.d/ocserv
2014-06-03 18:18:45 +02:00
endef
$(eval $(call BuildPackage,ocserv))