All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Hesse <list@eworm.de>
To: wireguard@lists.zx2c4.com
Cc: Christian Hesse <mail@eworm.de>
Subject: [PATCH 1/1] add dkms configuration file dkms.conf
Date: Sat,  3 Dec 2016 13:30:44 +0100	[thread overview]
Message-ID: <20161203123044.25848-1-list@eworm.de> (raw)

From: Christian Hesse <mail@eworm.de>

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

Signed-off-by: Christian Hesse <mail@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\"" && \
 	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

             reply	other threads:[~2016-12-03 12:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-03 12:30 Christian Hesse [this message]
2016-12-03 12:42 ` [PATCH v2 1/1] add dkms configuration file dkms.conf Christian Hesse
2016-12-03 22:21   ` Jason A. Donenfeld
2016-12-06  9:35     ` Christian Hesse
2016-12-06 18:14       ` Jason A. Donenfeld
2016-12-06 18:57         ` Jason A. Donenfeld
2016-12-06 20:15         ` Christian Hesse
2016-12-06 21:31           ` Jason A. Donenfeld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161203123044.25848-1-list@eworm.de \
    --to=list@eworm.de \
    --cc=mail@eworm.de \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.