# -*- 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
# please only update the version when the tools (in "src/tools") have
# been modified/updated (git commit messages starting with "tools:").
# the WireGuard repository and its updates primarily deals with the
# Linux kernel module, which isn't useful or relevant for macOS (we're
# just interested in its tools for manipulating WireGuard interfaces).
maintainers {isi.edu:calvin @cardi} openmaintainer
description Tools for the WireGuard VPN
WireGuard-tools contains command-line tools to interact with \
the userspace Go implementation of WireGuard. Currently there \
are two tools: wg, to set and retrieve configuration of \
WireGuard interfaces, and wg-quick, set up a WireGuard interface \
homepage https://www.wireguard.com/
master_sites https://git.zx2c4.com/WireGuard/snapshot/
distname WireGuard-${version}
checksums rmd160 22585e7bf14e49cd1a02b8f483aecffac53d64dc \
sha256 af05824211b27cbeeea2b8d6b76be29552c0d80bfe716471215e4e43d259e327 \
# only build and install the tools for macOS
build.pre_args -C src/tools
destroot.pre_args -C src/tools
destroot.post_args-append PREFIX=${prefix} \
SYSCONFDIR=${prefix}/etc \
WITH_BASHCOMPLETION=yes \
set completions_path ${prefix}/share/bash-completion/completions
set sysconfdir ${prefix}/etc
reinplace -E "s|^\(CONFIG_SEARCH_PATHS=.*\)\(/usr/local/etc\)|\\1${sysconfdir}|" ${destroot}${prefix}/bin/wg-quick
reinplace -E "s|\(search_paths\\+=.*\)\(/usr/local/etc\)|\\1${sysconfdir}|" ${destroot}${completions_path}/wg-quick
livecheck.url https://git.zx2c4.com/WireGuard/refs/