2 # Copyright (C) 2016-2017 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>
6 # This is free software, licensed under the GNU General Public License v2.
7 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
10 include $(INCLUDE_DIR
)/kernel.mk
14 PKG_VERSION
:=0.0.20170918
17 PKG_SOURCE
:=WireGuard-
$(PKG_VERSION
).
tar.xz
18 PKG_SOURCE_URL
:=https
://git.zx2c4.com
/WireGuard
/snapshot
/
19 PKG_HASH
:=e083f18596574fb7050167090bfb4db4df09a1a99f3c1adc77f820c166368881
22 PKG_LICENSE_FILES
:=COPYING
24 PKG_BUILD_DIR
:=$(BUILD_DIR
)/WireGuard-
$(PKG_VERSION
)
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
37 URL
:=https
://www.wireguard.com
38 MAINTAINER
:=Baptiste Jonglez
<openwrt@bitsofnetworks.org
>, \
39 Kevin Darbyshire-Bryant
<ldir@darbyshire-bryant.me.uk
>, \
40 Dan Luedtke
<mail@danrl.com
>, \
41 Jason A. Donenfeld
<Jason@zx2c4.com
>
44 define Package
/wireguard
/Default
/description
45 WireGuard is a novel VPN that runs inside the Linux Kernel and utilizes
46 state-of-the-art cryptography. It aims to be faster
, simpler
, leaner
, and
47 more useful than IPSec
, while avoiding the massive headache. It intends to
48 be considerably more performant than OpenVPN. WireGuard is designed
as a
49 general purpose VPN for running on embedded interfaces and super computers
50 alike
, fit for many different circumstances. It uses UDP.
53 define Package
/wireguard
54 $(call Package
/wireguard
/Default
)
55 TITLE
:=Wireguard meta-package
56 DEPENDS
:=+wireguard-tools
+kmod-wireguard
59 include $(INCLUDE_DIR
)/kernel-defaults.mk
60 include $(INCLUDE_DIR
)/package-defaults.mk
62 # Used by Build/Compile/Default
66 $(MAKE
) $(KERNEL_MAKEOPTS
) M
="$(PKG_BUILD_DIR)/src" modules
67 $(call Build
/Compile
/Default
)
70 define Package
/wireguard
/install
74 define Package
/wireguard
/description
75 $(call Package
/wireguard
/Default
/description
)
78 define Package
/wireguard-tools
79 $(call Package
/wireguard
/Default
)
80 TITLE
:=Wireguard userspace control program
(wg
)
84 define Package
/wireguard-tools
/description
85 $(call Package
/wireguard
/Default
/description
)
87 This package provides the userspace control program for wireguard
, `wg`,
88 and a netifd protocol helper.
91 define Package
/wireguard-tools
/install
92 $(INSTALL_DIR
) $(1)/usr
/bin
/
93 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/tools
/wg
$(1)/usr
/bin
/
94 $(INSTALL_DIR
) $(1)/lib
/netifd
/proto
/
95 $(INSTALL_BIN
) .
/files
/wireguard.sh
$(1)/lib
/netifd
/proto
/
98 define KernelPackage
/wireguard
100 CATEGORY
:=Kernel modules
101 SUBMENU
:=Network Support
102 TITLE
:=Wireguard kernel module
103 DEPENDS
:=+IPV6
:kmod-udptunnel6
+kmod-udptunnel4
104 FILES
:= $(PKG_BUILD_DIR
)/src
/wireguard.
$(LINUX_KMOD_SUFFIX
)
105 AUTOLOAD
:=$(call AutoProbe
,wireguard
)
108 define KernelPackage
/wireguard
/description
109 $(call Package
/wireguard
/Default
/description
)
111 This package provides the kernel module for wireguard.
114 $(eval
$(call BuildPackage
,wireguard
))
115 $(eval
$(call BuildPackage
,wireguard-tools
))
116 $(eval
$(call KernelPackage
,wireguard
))