[PATCH v2 1/1] add dkms configuration file dkms.conf

Christian Hesse list at eworm.de
Sat Dec 3 13:42:33 CET 2016


From: Christian Hesse <mail at eworm.de>

This add dkms configuration file dkms.conf and target in Makefile to
update the version.

Signed-off-by: Christian Hesse <mail at eworm.de>
---
 src/Makefile  | 14 ++++++++++----
 src/dkms.conf | 11 +++++++++++
 2 files changed, 21 insertions(+), 4 deletions(-)
 create mode 100644 src/dkms.conf

diff --git a/src/Makefile b/src/Makefile
index 20947ac..f5ab275 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -6,11 +6,17 @@ debug: module-debug tools
 
 version.h:
 	@export GIT_CEILING_DIRECTORIES="$$(readlink -f ../..)" && \
-	ver="#define WIREGUARD_VERSION \"$$(git describe --dirty 2>/dev/null)\"" && \
-	[ "$$(cat version.h 2>/dev/null)" != "$$ver" ] && \
-	echo "$$ver" > version.h && \
+	ver="$$(git describe --dirty 2>/dev/null)" && \
+	[ "$$(cut -d\" -f2 version.h 2>/dev/null)" != "$$ver" ] && \
+	echo "#define WIREGUARD_VERSION \"$$ver\"" > version.h && \
 	git update-index --assume-unchanged version.h || true
 
+dkms.conf:
+	ver="$$(git describe --dirty 2>/dev/null)" && \
+	[ "$$(grep PACKAGE_VERSION dkms.conf | cut -d\" -f2)" != "$$ver" ] && \
+	sed -i "/PACKAGE_VERSION/c PACKAGE_VERSION=\"$$ver\"" dkms.conf && \
+	git update-index --assume-unchanged dkms.conf || true
+
 module: version.h
 	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
 
@@ -38,4 +44,4 @@ cloc: clean
 
 include tests/debug.mk
 
-.PHONY: all module module-debug tools install clean core-cloc check version.h
+.PHONY: all module module-debug tools install clean core-cloc check version.h dkms.conf
diff --git a/src/dkms.conf b/src/dkms.conf
new file mode 100644
index 0000000..cef8e6d
--- /dev/null
+++ b/src/dkms.conf
@@ -0,0 +1,11 @@
+#
+# Linux DKMS config script for the WireGuard kernel module
+#
+
+PACKAGE_NAME="wireguard"
+PACKAGE_VERSION="experimental-0.0.20161129-3-g27f0e1e-dirty"
+AUTOINSTALL="yes"
+
+BUILT_MODULE_NAME="wireguard"
+DEST_MODULE_LOCATION="/kernel/net"
+
-- 
2.10.2



More information about the WireGuard mailing list