2 # Copyright (C) 2016 Baptiste Jonglez <openwrt@bitsofnetworks.org>
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
8 include $(INCLUDE_DIR
)/kernel.mk
12 PKG_VERSION
:=0.0.20161001
15 PKG_SOURCE
:=WireGuard-experimental-
$(PKG_VERSION
).
tar.xz
16 # This is actually SHA256, but OpenWRT/LEDE will figure it out based on the length
17 PKG_MD5SUM
:=ac3abb7b940716ac12b96a2cb3f7666598cbefd26f19c268f627dc47cd113ac8
18 PKG_SOURCE_URL
:=https
://git.zx2c4.com
/WireGuard
/snapshot
/
19 PKG_BUILD_DIR
:=$(BUILD_DIR
)/WireGuard-experimental-
$(PKG_VERSION
)
22 PKG_LICENSE_FILES
:=COPYING
27 # Wireguard's makefile needs this to know where to build the kernel module
28 export KERNELDIR
:=$(LINUX_DIR
)
30 include $(INCLUDE_DIR
)/package.mk
32 define Package
/wireguard
/Default
35 URL
:=https
://www.wireguard.io
36 MAINTAINER
:=Baptiste Jonglez
<openwrt@bitsofnetworks.org
>
39 define Package
/wireguard
/Default
/description
40 WireGuard is a novel VPN that runs inside the Linux Kernel and utilizes
41 state-of-the-art cryptography. It aims to be faster
, simpler
, leaner
, and
42 more useful than IPSec
, while avoiding the massive headache. It intends to
43 be considerably more performant than OpenVPN. WireGuard is designed
as a
44 general purpose VPN for running on embedded interfaces and super computers
45 alike
, fit for many different circumstances.
49 define Package
/wireguard
50 $(call Package
/wireguard
/Default
)
51 TITLE
:=Wireguard meta-package
52 DEPENDS
:=+wireguard-tools
+kmod-wireguard
55 include $(INCLUDE_DIR
)/kernel-defaults.mk
56 include $(INCLUDE_DIR
)/package-defaults.mk
58 # Used by Build/Compile/Default
62 $(MAKE
) $(KERNEL_MAKEOPTS
) M
="$(PKG_BUILD_DIR)/src" modules
63 $(call Build
/Compile
/Default
)
66 define Package
/wireguard
/description
67 $(call Package
/wireguard
/Default
/description
)
70 define Package
/wireguard-tools
71 $(call Package
/wireguard
/Default
)
72 TITLE
:=Wireguard userspace control program
(wg
)
76 define Package
/wireguard-tools
/description
77 $(call Package
/wireguard
/Default
/description
)
79 This package provides the userspace control program for wireguard
: `wg`.
82 define Package
/wireguard-tools
/install
83 $(INSTALL_DIR
) $(1)/usr
/bin
/
84 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/tools
/wg
$(1)/usr
/bin
/
87 define KernelPackage
/wireguard
89 CATEGORY
:=Kernel modules
90 SUBMENU
:=Network Support
91 TITLE
:=Wireguard kernel module
92 DEPENDS
:=@IPV6
+kmod-udptunnel4
+kmod-udptunnel6
+kmod-ipt-hashlimit
93 FILES
:= $(PKG_BUILD_DIR
)/src
/wireguard.
$(LINUX_KMOD_SUFFIX
)
94 AUTOLOAD
:=$(call AutoLoad
,33,wireguard
)
97 define KernelPackage
/wireguard
/description
98 $(call Package
/wireguard
/Default
/description
)
100 This package provides the kernel module for wireguard.
103 $(eval
$(call BuildPackage
,wireguard
))
104 $(eval
$(call BuildPackage
,wireguard-tools
))
105 $(eval
$(call KernelPackage
,wireguard
))