summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2020-04-03 00:12:17 -0400
committerMike Gilbert <floppym@gentoo.org>2020-04-03 00:12:17 -0400
commit0b4cb431553e9368a1459b928490b589bf203e80 (patch)
treea349e1a1a5238dc4840623550ac112c19cf13142 /net-vpn
parentnet-vpn/openconnect: fix tests to work with ocserv installed (diff)
downloadgentoo-0b4cb431553e9368a1459b928490b589bf203e80.tar.gz
gentoo-0b4cb431553e9368a1459b928490b589bf203e80.tar.bz2
gentoo-0b4cb431553e9368a1459b928490b589bf203e80.zip
net-vpn/ocserv: new package
Package-Manager: Portage-2.3.96_p4, Repoman-2.3.22_p1 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'net-vpn')
-rw-r--r--net-vpn/ocserv/Manifest1
-rw-r--r--net-vpn/ocserv/files/ocserv6
-rw-r--r--net-vpn/ocserv/metadata.xml12
-rw-r--r--net-vpn/ocserv/ocserv-1.0.0.ebuild81
4 files changed, 100 insertions, 0 deletions
diff --git a/net-vpn/ocserv/Manifest b/net-vpn/ocserv/Manifest
new file mode 100644
index 000000000000..61f88a45c784
--- /dev/null
+++ b/net-vpn/ocserv/Manifest
@@ -0,0 +1 @@
+DIST ocserv-1.0.0.tar.xz 785020 BLAKE2B 6fff9459a29508e4f0e25f77b28d2c8883b4c3ba43fc758b71f6f0c0a369946287dd810f3af91e037e79f8b4a4085961246f313d2cb982cacba66615c24b0bb9 SHA512 6f396c9180004f8d439e094f9de0490016b085dad6bd7a5d17d3433480b37de65c25fc0c52452f5ea408bb7bc997ddcbfcdd80a3bbe454af3267aa14edbb3df9
diff --git a/net-vpn/ocserv/files/ocserv b/net-vpn/ocserv/files/ocserv
new file mode 100644
index 000000000000..12fd1d0e20c8
--- /dev/null
+++ b/net-vpn/ocserv/files/ocserv
@@ -0,0 +1,6 @@
+#!/sbin/openrc-run
+
+command="${RC_PREFIX}/usr/sbin/ocserv"
+pidfile="${RC_PREFIX}/run/${RC_SVCNAME}.pid"
+command_args="--pid-file '${pidfile}'"
+command_args_foreground="--foreground"
diff --git a/net-vpn/ocserv/metadata.xml b/net-vpn/ocserv/metadata.xml
new file mode 100644
index 000000000000..499a99ebd4ed
--- /dev/null
+++ b/net-vpn/ocserv/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>floppym@gentoo.org</email>
+ <name>Mike Gilbert</name>
+ </maintainer>
+ <use>
+ <flag name="lz4">Enable support for lz4 compression</flag>
+ <flag name="otp">Enable support for one-time passwords</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-vpn/ocserv/ocserv-1.0.0.ebuild b/net-vpn/ocserv/ocserv-1.0.0.ebuild
new file mode 100644
index 000000000000..069c2334ddd7
--- /dev/null
+++ b/net-vpn/ocserv/ocserv-1.0.0.ebuild
@@ -0,0 +1,81 @@
+# Copyright 2019-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd
+
+DESCRIPTION="Openconnect SSL VPN server"
+HOMEPAGE="https://ocserv.gitlab.io/www/index.html"
+SRC_URI="ftp://ftp.infradead.org/pub/ocserv/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="geoip kerberos +lz4 otp pam radius +seccomp systemd tcpd test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ virtual/pkgconfig
+ test? (
+ net-libs/gnutls[tools(+)]
+ net-libs/socket_wrapper
+ sys-libs/nss_wrapper
+ sys-libs/uid_wrapper
+ )
+"
+DEPEND="
+ dev-libs/libnl:3=
+ dev-libs/libev:0=
+ >=dev-libs/nettle-2.7:0=
+ dev-libs/pcl:0=
+ dev-libs/protobuf-c:0=
+ >=net-libs/gnutls-3.3.0:0=
+ net-libs/http-parser:0=
+ sys-libs/readline:0=
+ sys-libs/talloc:0=
+ geoip? ( dev-libs/geoip:0= )
+ kerberos? ( virtual/krb5 )
+ lz4? ( app-arch/lz4:0= )
+ otp? ( sys-auth/oath-toolkit:0= )
+ pam? ( sys-libs/pam:0= )
+ radius? ( net-dialup/freeradius-client:0= )
+ seccomp? ( sys-libs/libseccomp:0= )
+ systemd? ( sys-apps/systemd:0= )
+ tcpd? ( sys-apps/tcp-wrappers:0= )
+"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ local myconf=(
+ --without-root-tests
+ --without-docker-tests
+ --without-nuttcp-tests
+
+ $(use_enable seccomp)
+ $(use_enable systemd)
+
+ $(use_with geoip)
+ $(use_with kerberos gssapi)
+ $(use_with lz4)
+ $(use_with otp liboath)
+ $(use_with radius)
+ $(use_with tcpd libwrap)
+ )
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+
+ dodoc doc/sample.{config,passwd}
+ use otp && dodoc doc/sample.otp
+
+ doinitd "${FILESDIR}"/ocserv
+
+ if use systemd; then
+ systemd_dounit doc/systemd/socket-activated/ocserv.{service,socket}
+ else
+ systemd_dounit doc/systemd/standalone/ocserv.service
+ fi
+}