summaryrefslogtreecommitdiff
blob: 97fb7414b3d2402e2996b9f3b81d51d294dc232e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit cmake-utils git-r3 systemd

DESCRIPTION="NetVirt is an open source network virtualization platform (NVP)"
HOMEPAGE="http://netvirt.org"
EGIT_REPO_URI="https://github.com/netvirt/netvirt.git"
EGIT_SUBMODULES=( '*' '-libconfig' )

LICENSE="GPL-3"
SLOT="0"
KEYWORDS=""
IUSE="gui"

RDEPEND="sys-libs/libcap
		dev-libs/libconfig
		dev-libs/openssl:=
		dev-libs/jansson
		dev-libs/libevent
		net-nds/openldap
		net-misc/curl[ssl]
		sys-libs/zlib
		sys-libs/glibc
		gui? ( dev-qt/qtgui:4
			dev-qt/qtdeclarative:4 )"
DEPEND="${RDEPEND}
		dev-util/scons
		dev-util/cmake"

src_configure() {
	local mycmakeargs=( -DWITH_GUI=$(usex gui) )
	cmake-utils_src_configure
}

src_compile() {
	cd tapcfg
	scons
	cd ..
	cmake-utils_src_compile
}

src_install() {
	cmake-utils_src_install
	systemd_newunit "${FILESDIR}"/netvirt-agent.service netvirt-agent.service
	newinitd "${FILESDIR}"/netvirt-agent.rc netvirt-agent
}

pkg_postinst() {
	elog "Carefully read https://doc.dynvpn.com to get started. In particular"
	elog "you will have to provision a network using netvirt-agent2 -k ... and"
	elog "edit the init scripts to connect to the right network."
}