quarks/net-vpn/openvpn3-cli/openvpn3-cli-3.10.4.ebuild

51 lines
908 B
Bash
Raw Permalink Normal View History

2024-11-15 22:37:26 +00:00
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="Next generation minimal OpenVPN client"
HOMEPAGE="https://openvpn.net"
SRC_URI="https://github.com/OpenVPN/openvpn3/archive/refs/tags/release/$PV/openvpn3-$PV.tar.gz"
LICENSE="AGPL-3+"
SLOT="0"
IUSE="dco"
KEYWORDS="~amd64"
DEPEND="
dev-libs/jsoncpp
sys-libs/libcap
app-arch/lz4
dev-cpp/asio
dev-libs/xxhash
dco? (
net-vpn/ovpn-dco:=
>=dev-libs/protobuf-2.4.0:=
>=dev-libs/libnl-3.2.29:=
)"
RESTRICT="test"
S="$WORKDIR/openvpn3-release-$PV"
src_configure() {
sed -i -e 's,add_subdirectory(test/unittests),,' CMakeLists.txt
cmake -G Ninja -B build \
-DBUILD_SHARED_LIBS=False
}
src_compile() {
cmake --build build
}
src_install() {
install -Dm755 build/test/ovpncli/ovpncli -t "$D"/usr/bin
mkdir "$D"/usr/include
mv openvpn "$D"/usr/include
}