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"
10 HOMEPAGE
="http://www.ntop.org/n2n/"
11 SRC_URI
="https://github.com/ntop/n2n/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
25 openssl? ( dev-libs/openssl )
26 caps? ( sys-libs/libcap )
27 pcap? ( net-libs/libpcap )
28 zstd? ( app-arch/zstd )
29 upnp? ( net-libs/miniupnpc net-libs/libnatpmp )
35 -DBUILD_SHARED_LIBS=OFF
36 -DN2N_OPTION_USE_OPENSSL="$(usex openssl ON OFF)"
37 -DN2N_OPTION_USE_OPENSSL="$(usex openssl ON OFF)"
38 -DN2N_OPTION_USE_CAPLIB="$(usex caps ON OFF)"
39 -DN2N_OPTION_USE_PCAPLIB="$(usex pcap ON OFF)"
40 -DN2N_OPTION_USE_ZSTD="$(usex zstd ON OFF)"
41 -DN2N_OPTION_USE_PORTMAPPING="$(usex upnp ON OFF)"
48 rm -r "${D:?}/usr/share" || die
51 doman
"${S}/supernode.1"
53 systemd_newunit
"${S}/packages/etc/systemd/system/edge@.service.in" n2n-edge@.service
54 systemd_newunit
"${S}/packages/etc/systemd/system/supernode.service.in" n2n-supernode.service
56 newins
"${S}/packages/etc/n2n/edge.conf.sample" edge-example.conf
57 doins
"${S}/packages/etc/n2n/supernode.conf.sample"