From c3f16e68c8476357370131547c22f4dcc6b9e2ff Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Tue, 4 Jun 2013 15:29:43 +0200 Subject: Expose version information Profiles now have access to it. --- Makefile | 6 +++--- src/lib/globals | 1 + src/netctl.in | 2 -- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 5bf8c36..bf6b73d 100644 --- a/Makefile +++ b/Makefile @@ -37,12 +37,12 @@ install: tarball: netctl-$(VERSION).tar.xz netctl-$(VERSION).tar.xz: $(MAKE) -B -C docs - cp src/netctl.in{,.orig} - sed -i "s|NETCTL_VERSION=.*|NETCTL_VERSION=$(VERSION)|" src/netctl.in + cp src/lib/globals{,.orig} + sed -i "s|NETCTL_VERSION=.*|NETCTL_VERSION=$(VERSION)|" src/lib/globals git stash save -q git archive -o netctl-$(VERSION).tar --prefix=netctl-$(VERSION)/ stash git stash pop -q - mv src/netctl.in{.orig,} + mv src/lib/globals{.orig,} tar --exclude-vcs --transform "s|^|netctl-$(VERSION)/|" --owner=root --group=root --mtime=./netctl-$(VERSION).tar -rf netctl-$(VERSION).tar docs/*.[1-8] xz netctl-$(VERSION).tar gpg --detach-sign $@ diff --git a/src/lib/globals b/src/lib/globals index 83c64a2..ee45f52 100644 --- a/src/lib/globals +++ b/src/lib/globals @@ -1,3 +1,4 @@ +NETCTL_VERSION="notpackaged" PROFILE_DIR="/etc/netctl" SUBR_DIR="/usr/lib/network" CONN_DIR="$SUBR_DIR/connections" diff --git a/src/netctl.in b/src/netctl.in index ed4cea4..57b528d 100644 --- a/src/netctl.in +++ b/src/netctl.in @@ -2,8 +2,6 @@ . /usr/lib/network/globals -NETCTL_VERSION=notpackaged - usage() { cat << END -- cgit v1.2.3-24-g4f1b