3cdbaa785cd0afb06cdbbddd80ade51522654529
[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.20200827
15 PKG_RELEASE:=2
16
17 PKG_SOURCE:=wireguard-tools-$(PKG_VERSION).tar.xz
18 PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-tools/snapshot/
19 PKG_HASH:=51bc85e33a5b3cf353786ae64b0f1216d7a871447f058b6137f793eb0f53b7fd
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:=+@BUSYBOX_CONFIG_IP +@BUSYBOX_CONFIG_FEATURE_IP_LINK
40 endef
41
42 define Package/wireguard-tools/description
43 WireGuard is a novel VPN that runs inside the Linux Kernel and utilizes
44 state-of-the-art cryptography. It aims to be faster, simpler, leaner, and
45 more useful than IPSec, while avoiding the massive headache. It intends to
46 be considerably more performant than OpenVPN. WireGuard is designed as a
47 general purpose VPN for running on embedded interfaces and super computers
48 alike, fit for many different circumstances. It uses UDP.
49
50 This package provides the userspace control program for WireGuard,
51 `wg(8)`, a netifd protocol helper, and a re-resolve watchdog script.
52 endef
53
54 define Package/wireguard-tools/install
55 $(INSTALL_DIR) $(1)/usr/bin/
56 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wg $(1)/usr/bin/
57 $(INSTALL_BIN) ./files/wireguard_watchdog $(1)/usr/bin/
58 $(INSTALL_DIR) $(1)/lib/netifd/proto/
59 $(INSTALL_BIN) ./files/wireguard.sh $(1)/lib/netifd/proto/
60 endef
61
62 $(eval $(call BuildPackage,wireguard-tools))