12127eb12f6873dd5f3c11d6f79b59c4a52f4ec9
[openwrt/openwrt.git] / package / network / utils / wireguard-tools / Makefile
1 #
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
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=wireguard-tools
12
13 PKG_VERSION:=1.0.20250521
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=wireguard-tools-$(PKG_VERSION).tar.xz
17 PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-tools/snapshot/
18 PKG_HASH:=b6f2628b85b1b23cc06517ec9c74f82d52c4cdbd020f3dd2f00c972a1782950e
19
20 PKG_LICENSE:=GPL-2.0
21 PKG_LICENSE_FILES:=COPYING
22
23 PKG_BUILD_PARALLEL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26
27 MAKE_PATH:=src
28 MAKE_VARS += PLATFORM=linux
29
30 define 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
41 endef
42
43 define 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.
53 endef
54
55 define 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/
61 endef
62
63 $(eval $(call BuildPackage,wireguard-tools))