aboutsummaryrefslogtreecommitdiff
path: root/package/wireguard-tools/wireguard-tools.mk
diff options
context:
space:
mode:
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))