File wireguard-tools.spec of Package wireguard-tools

# spec file for package wireguard-tools
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2020-2021, Martin Hauke <>
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           wireguard-tools
Version:        1.0.20210424
Release:        0
Summary:        WireGuard userspace tools
License:        GPL-2.0-only
Group:          Productivity/Networking/Security
BuildRequires:  bash-completion
BuildRequires:  pkgconfig

WireGuard is a novel VPN that runs inside the Linux Kernel and uses
state-of-the-art cryptography (the "Noise" protocol). It aims to be
faster, simpler, leaner, and more useful than IPSec, while avoiding
the massive headache. It intends to be considerably more performant
than OpenVPN. WireGuard is designed as a general purpose VPN for
running on embedded interfaces and super computers alike, fit for
many different circumstances. It runs over UDP.

This package contains command-line tools to interact with the
WireGuard kernel module.  Currently, it provides only a single tool:

wg: set and retrieve configuration of WireGuard interfaces

%setup -q -n wireguard-tools-%{version}
## HACK: Fixing wg-quick's DNS= directive with a hatchet

export CFLAGS="%{optflags}"
make V=1 -C src %{?_smp_mflags}

cd src
%{make_install} \
    WITH_WGQUICK=yes \

install -d %{buildroot}/%{_sysconfdir}/wireguard/

%service_add_pre wg-quick@.service

%service_add_post wg-quick@.service

%service_del_preun wg-quick@.service

%service_del_postun wg-quick@.service

%license COPYING

openSUSE Build Service is sponsored by