wireguard: bump to 1.0.20200506
[openwrt/openwrt.git] / package / network / services / wireguard / 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
13
14 PKG_VERSION:=1.0.20200506
15 PKG_RELEASE:=1
16
17 PKG_SOURCE:=wireguard-linux-compat-$(PKG_VERSION).tar.xz
18 PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-linux-compat/snapshot/
19 PKG_HASH:=98a99f2b825a82d57a7213e666f1ee4f7cc02bddb09bf4908b4b09447a8f121e
20
21 PKG_LICENSE:=GPL-2.0
22 PKG_LICENSE_FILES:=COPYING
23
24 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/wireguard-linux-compat-$(PKG_VERSION)
25 PKG_BUILD_PARALLEL:=1
26 PKG_USE_MIPS16:=0
27
28 # WireGuard's makefile needs this to know where to build the kernel module
29 export KERNELDIR:=$(LINUX_DIR)
30
31 include $(INCLUDE_DIR)/package.mk
32
33 define Package/wireguard/Default
34 SECTION:=net
35 CATEGORY:=Network
36 SUBMENU:=VPN
37 URL:=https://www.wireguard.com
38 MAINTAINER:=Jason A. Donenfeld <Jason@zx2c4.com> \
39 Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
40 endef
41
42 define Package/wireguard/Default/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 endef
50
51 define Package/wireguard
52 $(call Package/wireguard/Default)
53 TITLE:=WireGuard meta-package
54 DEPENDS:=+wireguard-tools +kmod-wireguard
55 endef
56
57 include $(INCLUDE_DIR)/kernel-defaults.mk
58 include $(INCLUDE_DIR)/package-defaults.mk
59
60 define Build/Compile
61 $(MAKE) $(KERNEL_MAKEOPTS) M="$(PKG_BUILD_DIR)/src" modules
62 endef
63
64 define Package/wireguard/install
65 true
66 endef
67
68 define Package/wireguard/description
69 $(call Package/wireguard/Default/description)
70 endef
71
72 define KernelPackage/wireguard
73 SECTION:=kernel
74 CATEGORY:=Kernel modules
75 SUBMENU:=Network Support
76 TITLE:=WireGuard kernel module
77 DEPENDS:=+IPV6:kmod-udptunnel6 +kmod-udptunnel4
78 FILES:= $(PKG_BUILD_DIR)/src/wireguard.$(LINUX_KMOD_SUFFIX)
79 AUTOLOAD:=$(call AutoProbe,wireguard)
80 endef
81
82 define KernelPackage/wireguard/description
83 $(call Package/wireguard/Default/description)
84
85 This package provides the kernel module for WireGuard.
86 endef
87
88 $(eval $(call BuildPackage,wireguard))
89 $(eval $(call KernelPackage,wireguard))