Skip to content

Commit 928a133

Browse files
committed
Updated Wireguard version to 0.0.20191226. This also means this project supports the non-monolithic releases
1 parent db34146 commit 928a133

File tree

3 files changed

+25
-15
lines changed

3 files changed

+25
-15
lines changed

INFO.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
source /pkgscripts-ng/include/pkg_util.sh
33

44
package="WireGuard"
5-
version="0.0.20190702"
5+
version="0.0.20191226"
66
displayname="WireGuard"
77
maintainer="Andreas Runfalk"
88
arch="$(pkg_get_platform)"

Makefile

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
WIREGUARD_VERSION ?= 0.0.20190702
1+
WIREGUARD_VERSION ?= 0.0.20191226
2+
WIREGUARD_TOOLS_VERSION ?= 1.0.20191226
23
LIBMNL_VERSION ?= 1.0.4
34
HAS_MEMNEQ ?= 0
45

56
LIBMNL_TAR := libmnl-$(LIBMNL_VERSION).tar.bz2
67
LIBMNL_DIR := libmnl-$(LIBMNL_VERSION)
78

8-
WIREGUARD_TAR := WireGuard-$(WIREGUARD_VERSION).tar.xz
9-
WIREGUARD_DIR := WireGuard-$(WIREGUARD_VERSION)
9+
WIREGUARD_TAR := wireguard-linux-compat-$(WIREGUARD_VERSION).tar.xz
10+
WIREGUARD_DIR := wireguard-linux-compat-$(WIREGUARD_VERSION)
1011

11-
WG_TARGET := $(WIREGUARD_DIR)/src/tools/wg
12-
WG_QUICK_TARGET := $(WIREGUARD_DIR)/wg-quick
12+
WIREGUARD_TOOLS_TAR := wireguard-tools-$(WIREGUARD_TOOLS_VERSION).tar.xz
13+
WIREGUARD_TOOLS_DIR := wireguard-tools-$(WIREGUARD_TOOLS_VERSION)
14+
15+
WG_TARGET := $(WIREGUARD_TOOLS_DIR)/src/wg
16+
WG_QUICK_TARGET := $(WIREGUARD_TOOLS_DIR)/wg-quick
1317
WG_MODULE_TARGET := $(WIREGUARD_DIR)/src/wireguard.ko
1418

1519
GCC := $(CROSS_COMPILE)gcc
@@ -34,7 +38,10 @@ $(LIBMNL_DIR)/src/.libs/libmnl.a: $(LIBMNL_DIR)/Makefile
3438

3539
# Download WireGuard source tarball
3640
$(WIREGUARD_TAR):
37-
wget https://git.zx2c4.com/WireGuard/snapshot/$(WIREGUARD_TAR)
41+
wget https://git.zx2c4.com/wireguard-linux-compat/snapshot/$(WIREGUARD_TAR)
42+
43+
$(WIREGUARD_TOOLS_TAR):
44+
wget https://git.zx2c4.com/wireguard-tools/snapshot/$(WIREGUARD_TOOLS_TAR)
3845

3946
# Unpack WireGuard source tarball and patch the compatibility layer to always
4047
# use memneq implementation as it doesn't appear to be included on the D218j.
@@ -44,16 +51,19 @@ ifeq ($(HAS_MEMNEQ), 0)
4451
patch $(WIREGUARD_DIR)/src/compat/Kbuild.include $(ROOT_DIR)/memneq.patch
4552
endif
4653

54+
$(WIREGUARD_TOOLS_DIR)/src/Makefile: $(WIREGUARD_TOOLS_TAR)
55+
tar -xf $(WIREGUARD_TOOLS_TAR)
56+
4757
# Build the wg command line tool
48-
$(WG_TARGET): $(LIBMNL_DIR)/src/.libs/libmnl.a $(WIREGUARD_DIR)/src/Makefile
49-
CFLAGS=-I$(ROOT_DIR)/$(LIBMNL_DIR)/include LDFLAGS=-L$(ROOT_DIR)/$(LIBMNL_DIR)/src/.libs make -C $(WIREGUARD_DIR)/src/tools CC=$(GCC)
58+
$(WG_TARGET): $(LIBMNL_DIR)/src/.libs/libmnl.a $(WIREGUARD_TOOLS_DIR)/src/Makefile
59+
CFLAGS=-I$(ROOT_DIR)/$(LIBMNL_DIR)/include LDFLAGS=-L$(ROOT_DIR)/$(LIBMNL_DIR)/src/.libs make -C $(WIREGUARD_TOOLS_DIR)/src CC=$(GCC)
5060

5161
# Choose the correct wg-quick implementation
52-
$(WG_QUICK_TARGET): $(WIREGUARD_DIR)/src/Makefile
53-
cp $(WIREGUARD_DIR)/src/tools/wg-quick/linux.bash $(WG_QUICK_TARGET)
62+
$(WG_QUICK_TARGET): $(WIREGUARD_TOOLS_DIR)/src/Makefile
63+
cp $(WIREGUARD_TOOLS_DIR)/src/wg-quick/linux.bash $(WG_QUICK_TARGET)
5464

5565
# Build wireguard.ko kernel module
56-
$(WG_MODULE_TARGET):
66+
$(WG_MODULE_TARGET): $(WIREGUARD_DIR)/src/Makefile
5767
make -C $(WIREGUARD_DIR)/src module ARCH=$(ARCH) KERNELDIR=$(KSRC)
5868

5969
install: all
@@ -63,4 +73,4 @@ install: all
6373
install $(WG_MODULE_TARGET) $(DESTDIR)/wireguard/
6474

6575
clean:
66-
rm -rf $(LIBMNL_TAR) $(LIBMNL_DIR) $(WIREGUARD_TAR) $(WIREGUARD_DIR)
76+
rm -rf $(LIBMNL_TAR) $(LIBMNL_DIR) $(WIREGUARD_TAR) $(WIREGUARD_DIR) $(WIREGUARD_TOOLS_TAR) $(WIREGUARD_TOOLS_DIR)

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Now we can build for any platform and DSM version using:
146146

147147
.. code-block:: bash
148148
149-
sudo docker run --rm --privileged --env PACKAGE_ARCH=<arch> --env DSM_VER=<dsm-ver> -v $(pwd)/artifacts:/result_spk -v $(pwd)/sdk_cache:/toolkit_tarballs synobuild
149+
sudo docker run --rm --privileged --env PACKAGE_ARCH=<arch> --env DSM_VER=<dsm-ver> -v $(pwd)/artifacts:/result_spk synobuild
150150
151151
You should replace ``<arch>`` with your NAS's package arch. Using
152152
`this table <https://www.synology.com/en-global/knowledgebase/DSM/tutorial/General/What_kind_of_CPU_does_my_NAS_have>`_
@@ -158,7 +158,7 @@ For the DS218j that I have, the complete command looks like this:
158158

159159
.. code-block:: bash
160160
161-
sudo docker run --rm --privileged --env PACKAGE_ARCH=armada38x --env DSM_VER=6.2 -v $(pwd)/artifacts:/result_spk -v $(pwd)/sdk_cache:/toolkit_tarballs synobuild
161+
sudo docker run --rm --privileged --env PACKAGE_ARCH=armada38x --env DSM_VER=6.2 -v $(pwd)/artifacts:/result_spk synobuild
162162
163163
If everything worked you should have a directory called ``artifacts`` that
164164
contains your SPK files.

0 commit comments

Comments
 (0)