2 # Copyright (C) 2016 Jason A. Donenfeld <Jason@zx2c4.com>
3 # Copyright (C) 2016 Baptiste Jonglez <openwrt@bitsofnetworks.org>
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
13 PKG_VERSION
:=0.0.20161230
16 PKG_SOURCE
:=WireGuard-
$(PKG_VERSION
).
tar.xz
17 # This is actually SHA256, but OpenWRT/LEDE will figure it out based on the length
18 PKG_MD5SUM
:=69c9770daf9c8ff6632d614afc117b60774760f1224c9322c84f8da92b9ae396
19 PKG_SOURCE_URL
:=https
://git.zx2c4.com
/WireGuard
/snapshot
/
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/WireGuard-
$(PKG_VERSION
)
23 PKG_LICENSE_FILES
:=COPYING
28 # Wireguard's makefile needs this to know where to build the kernel module
29 export KERNELDIR
:=$(LINUX_DIR
)
31 include $(INCLUDE_DIR
)/package.mk
33 define Package
/wireguard
/Default
36 URL
:=https
://www.wireguard.io
37 MAINTAINER
:=Baptiste Jonglez
<openwrt@bitsofnetworks.org
>, \
38 Dan Luedtke
<mail@danrl.com
>
41 define Package
/wireguard
/Default
/description
42 WireGuard is a novel VPN that runs inside the Linux Kernel and utilizes
43 state-of-the-art cryptography. It aims to be faster
, simpler
, leaner
, and
44 more useful than IPSec
, while avoiding the massive headache. It intends to
45 be considerably more performant than OpenVPN. WireGuard is designed
as a
46 general purpose VPN for running on embedded interfaces and super computers
47 alike
, fit for many different circumstances.
51 define Package
/wireguard
52 $(call Package
/wireguard
/Default
)
53 TITLE
:=Wireguard meta-package
54 DEPENDS
:=+wireguard-tools
+kmod-wireguard
57 include $(INCLUDE_DIR
)/kernel-defaults.mk
58 include $(INCLUDE_DIR
)/package-defaults.mk
60 # Used by Build/Compile/Default
64 $(MAKE
) $(KERNEL_MAKEOPTS
) M
="$(PKG_BUILD_DIR)/src" modules
65 $(call Build
/Compile
/Default
)
68 define Package
/wireguard
/description
69 $(call Package
/wireguard
/Default
/description
)
72 define Package
/wireguard-tools
73 $(call Package
/wireguard
/Default
)
74 TITLE
:=Wireguard userspace control program
(wg
)
78 define Package
/wireguard-tools
/description
79 $(call Package
/wireguard
/Default
/description
)
81 This package provides the userspace control program for wireguard
, `wg`,
82 and a netifd protocol helper.
85 define Package
/wireguard-tools
/install
86 $(INSTALL_DIR
) $(1)/usr
/bin
/
87 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/tools
/wg
$(1)/usr
/bin
/
88 $(INSTALL_DIR
) $(1)/lib
/netifd
/proto
/
89 $(INSTALL_BIN
) .
/files
/wireguard.sh
$(1)/lib
/netifd
/proto
/
92 define KernelPackage
/wireguard
94 CATEGORY
:=Kernel modules
95 SUBMENU
:=Network Support
96 TITLE
:=Wireguard kernel module
97 DEPENDS
:=+IPV6
:kmod-udptunnel6
+kmod-udptunnel4
+kmod-ipt-hashlimit
98 FILES
:= $(PKG_BUILD_DIR
)/src
/wireguard.
$(LINUX_KMOD_SUFFIX
)
99 AUTOLOAD
:=$(call AutoLoad
,33,wireguard
)
102 define KernelPackage
/wireguard
/description
103 $(call Package
/wireguard
/Default
/description
)
105 This package provides the kernel module for wireguard.
108 $(eval
$(call BuildPackage
,wireguard
))
109 $(eval
$(call BuildPackage
,wireguard-tools
))
110 $(eval
$(call KernelPackage
,wireguard
))