# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0

github.setup        cjdelisle cjdns 22.3 cjdns-v
github.tarball_from archive
revision            0
categories          net
maintainers         {l2dy @l2dy} openmaintainer
license             GPL-3

description         Cjdns implements an encrypted IPv6 network.

long_description    Cjdns implements an encrypted IPv6 network using public-key \
                    cryptography for address allocation and a distributed hash table \
                    for routing. This provides near-zero-configuration networking, and \
                    prevents many of the security and scalability issues that plague existing networks.

checksums           rmd160  ae0a2270a4c7f33f5af7ef64c967693824fecbee \
                    sha256  99e20274d581949b9a5998564485f567732e7888ac786c2edb43493048e4d0ef \
                    size    1525119

depends_build-append bin:node:nodejs20 \
                     port:rust \
                     port:cargo

use_configure       no
use_xcode           yes

build.cmd           "./do"
build.target
build.env-append    CC=${configure.cc}

destroot {
        xinstall -m 755 -d ${destroot}${prefix}/bin
        xinstall -m 755 -s ${worksrcpath}/target/release/cjdroute ${destroot}${prefix}/bin
}
