717ec2bbb1431b6f7a559d3177158fe10832986a
[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 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=wireguard-tools
13
14 PKG_VERSION:=1.0.20210424
15 PKG_RELEASE:=$(AUTORELEASE)
16
17 PKG_SOURCE:=wireguard-tools-$(PKG_VERSION).tar.xz
18 PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-tools/snapshot/
19 PKG_HASH:=b288b0c43871d919629d7e77846ef0b47f8eeaa9ebc9cedeee8233fc6cc376ad
20
21 PKG_LICENSE:=GPL-2.0
22 PKG_LICENSE_FILES:=COPYING
23
24 PKG_BUILD_PARALLEL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27 include $(INCLUDE_DIR)/package-defaults.mk
28
29 MAKE_PATH:=src
30 MAKE_VARS += PLATFORM=linux
31
32 define Package/wireguard-tools
33 SECTION:=net
34 CATEGORY:=Network
35 SUBMENU:=VPN
36 URL:=https://www.wireguard.com
37 MAINTAINER:=Jason A. Donenfeld <Jason@zx2c4.com>
38 TITLE:=WireGuard userspace control program (wg)
39 DEPENDS:= \
40 +@BUSYBOX_CONFIG_IP \
41 +@BUSYBOX_CONFIG_FEATURE_IP_LINK \
42 +kmod-wireguard
43 endef
44
45 define Package/wireguard-tools/description
46 WireGuard is a novel VPN that runs inside the Linux Kernel and utilizes
47 state-of-the-art cryptography. It aims to be faster, simpler, leaner, and
48 more useful than IPSec, while avoiding the massive headache. It intends to
49 be considerably more performant than OpenVPN. WireGuard is designed as a
50 general purpose VPN for running on embedded interfaces and super computers
51 alike, fit for many different circumstances. It uses UDP.
52
53 This package provides the userspace control program for WireGuard,
54 `wg(8)`, a netifd protocol helper, and a re-resolve watchdog script.
55 endef
56
57 define Package/wireguard-tools/install
58 $(INSTALL_DIR) $(1)/usr/bin/
59 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wg $(1)/usr/bin/
60 $(INSTALL_BIN) ./files/wireguard_watchdog $(1)/usr/bin/
61 $(INSTALL_DIR) $(1)/lib/netifd/proto/
62 $(INSTALL_BIN) ./files/wireguard.sh $(1)/lib/netifd/proto/
63 endef
64
65 $(eval $(call BuildPackage,wireguard-tools))