aboutsummaryrefslogtreecommitdiff
path: root/package/wireguard-tools/wireguard-tools.mk
diff options
context:
space:
mode:
authorGravatar Peter Korsgaard <peter@korsgaard.com>2020-01-09 10:16:18 +0100
committerGravatar Yann E. MORIN <yann.morin.1998@free.fr>2020-01-09 17:56:37 +0100
commita269c49f9ffd59eb9dcb3308ba464150fa3b036f (patch)
treefd1b0b85608b0bd42e13a49628ec7b4f1f5f94e4 /package/wireguard-tools/wireguard-tools.mk
parent09c5f205744dd5501f3ebc821a123133538e5540 (diff)
downloadbuildroot-a269c49f9ffd59eb9dcb3308ba464150fa3b036f.tar.gz
buildroot-a269c49f9ffd59eb9dcb3308ba464150fa3b036f.tar.bz2
package/wireguard: change to the wireguard-tools package
With the kernel support for WireGuard getting mainlined, the upstream repo has been split in a wireguard-tools repo for the userspace tooling and wireguard-linux-compat for the kernel side (for 3.10+ legacy kernels). So rename the package to wireguard-tools, use the new upstream and drop the kernel module handling. Also add Config.in.legacy handling for existing users. Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Diffstat (limited to 'package/wireguard-tools/wireguard-tools.mk')
-rw-r--r--package/wireguard-tools/wireguard-tools.mk36
1 files changed, 36 insertions, 0 deletions
diff --git a/package/wireguard-tools/wireguard-tools.mk b/package/wireguard-tools/wireguard-tools.mk
new file mode 100644
index 0000000000..6fcfebf13a
--- /dev/null
+++ b/package/wireguard-tools/wireguard-tools.mk
@@ -0,0 +1,36 @@
+################################################################################
+#
+# wireguard-tools
+#
+################################################################################
+
+WIREGUARD_TOOLS_VERSION = 1.0.20200102
+WIREGUARD_TOOLS_SITE = https://git.zx2c4.com/wireguard-tools/snapshot
+WIREGUARD_TOOLS_SOURCE = wireguard-tools-$(WIREGUARD_TOOLS_VERSION).tar.xz
+WIREGUARD_TOOLS_LICENSE = GPL-2.0
+WIREGUARD_TOOLS_LICENSE_FILES = COPYING
+WIREGUARD_TOOLS_DEPENDENCIES = host-pkgconf libmnl
+
+ifeq ($(BR2_INIT_SYSTEMD),y)
+WIREGUARD_TOOLS_MAKE_OPTS += WITH_SYSTEMDUNITS=yes
+else
+WIREGUARD_TOOLS_MAKE_OPTS += WITH_SYSTEMDUNITS=no
+endif
+
+ifeq ($(BR2_PACKAGE_BASH),y)
+WIREGUARD_TOOLS_MAKE_OPTS += WITH_BASHCOMPLETION=yes WITH_WGQUICK=yes
+else
+WIREGUARD_TOOLS_MAKE_OPTS += WITH_BASHCOMPLETION=no WITH_WGQUICK=no
+endif
+
+define WIREGUARD_TOOLS_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(WIREGUARD_TOOLS_MAKE_OPTS) \
+ -C $(@D)/src
+endef
+
+define WIREGUARD_TOOLS_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(WIREGUARD_TOOLS_MAKE_OPTS) \
+ -C $(@D)/src install DESTDIR=$(TARGET_DIR)
+endef
+
+$(eval $(generic-package))