blob: d704577d2c19c86af040462bc47805fc5ef0462a [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#
2# Copyright (C) 2016-2019 Jason A. Donenfeld <Jason@zx2c4.com>
3# Copyright (C) 2016 Baptiste Jonglez <openwrt@bitsofnetworks.org>
4# Copyright (C) 2016-2017 Dan Luedtke <mail@danrl.com>
5#
6# This is free software, licensed under the GNU General Public License v2.
7# See /LICENSE for more information.
8
9include $(TOPDIR)/rules.mk
10
11PKG_NAME:=wireguard-tools
12
13PKG_VERSION:=1.0.20210914
14PKG_RELEASE:=4
15
16PKG_SOURCE:=wireguard-tools-$(PKG_VERSION).tar.xz
17PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-tools/snapshot/
18PKG_HASH:=97ff31489217bb265b7ae850d3d0f335ab07d2652ba1feec88b734bc96bd05ac
19
20PKG_LICENSE:=GPL-2.0
21PKG_LICENSE_FILES:=COPYING
22
23PKG_BUILD_PARALLEL:=1
24
25include $(INCLUDE_DIR)/package.mk
26
27MAKE_PATH:=src
28MAKE_VARS += PLATFORM=linux
29
30define Package/wireguard-tools
31 SECTION:=net
32 CATEGORY:=Network
33 SUBMENU:=VPN
34 URL:=https://www.wireguard.com
35 MAINTAINER:=Jason A. Donenfeld <Jason@zx2c4.com>
36 TITLE:=WireGuard userspace control program (wg)
37 DEPENDS:= \
38 +!BUSYBOX_CONFIG_IP:ip \
39 +!BUSYBOX_CONFIG_FEATURE_IP_LINK:ip \
40 +kmod-wireguard
41endef
42
43define Package/wireguard-tools/description
44 WireGuard is a novel VPN that runs inside the Linux Kernel and utilizes
45 state-of-the-art cryptography. It aims to be faster, simpler, leaner, and
46 more useful than IPSec, while avoiding the massive headache. It intends to
47 be considerably more performant than OpenVPN. WireGuard is designed as a
48 general purpose VPN for running on embedded interfaces and super computers
49 alike, fit for many different circumstances. It uses UDP.
50
51 This package provides the userspace control program for WireGuard,
52 `wg(8)`, a netifd protocol helper, and a re-resolve watchdog script.
53endef
54
55define Package/wireguard-tools/install
56 $(INSTALL_DIR) $(1)/usr/bin/
57 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wg $(1)/usr/bin/
58 $(INSTALL_BIN) ./files/wireguard_watchdog $(1)/usr/bin/
59 $(INSTALL_DIR) $(1)/lib/netifd/proto/
60 $(INSTALL_BIN) ./files/wireguard.sh $(1)/lib/netifd/proto/
61endef
62
63$(eval $(call BuildPackage,wireguard-tools))