1 # Copyright 2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 DESCRIPTION
="A Layer Two Peer-to-Peer VPN"
8 inherit systemd cmake git-r3
10 HOMEPAGE
="http://www.ntop.org/n2n/"
21 EGIT_REPO_URI
="https://github.com/ntop/n2n.git"
26 openssl? ( dev-libs/openssl )
27 caps? ( sys-libs/libcap )
28 pcap? ( net-libs/libpcap )
29 zstd? ( app-arch/zstd )
30 upnp? ( net-libs/miniupnpc net-libs/libnatpmp )
36 -DBUILD_SHARED_LIBS=OFF
37 -DN2N_OPTION_USE_OPENSSL="$(usex openssl ON OFF)"
38 -DN2N_OPTION_USE_OPENSSL="$(usex openssl ON OFF)"
39 -DN2N_OPTION_USE_CAPLIB="$(usex caps ON OFF)"
40 -DN2N_OPTION_USE_PCAPLIB="$(usex pcap ON OFF)"
41 -DN2N_OPTION_USE_ZSTD="$(usex zstd ON OFF)"
42 -DN2N_OPTION_USE_PORTMAPPING="$(usex upnp ON OFF)"
49 rm -r "${D:?}/usr/share" || die
52 doman
"${S}/supernode.1"
54 systemd_newunit
"${S}/packages/etc/systemd/system/edge@.service.in" n2n-edge@.service
55 systemd_newunit
"${S}/packages/etc/systemd/system/supernode.service.in" n2n-supernode.service
57 newins
"${S}/packages/etc/n2n/edge.conf.sample" edge-example.conf
58 doins
"${S}/packages/etc/n2n/supernode.conf.sample"