]> git.ipfire.org Git - network.git/commitdiff
Introduce new versioning schema. 001
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 29 Jul 2011 17:49:54 +0000 (17:49 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 29 Jul 2011 17:49:54 +0000 (17:49 +0000)
Create a version information file in the system.

Makefile
functions

index 85a5caeba4b856026e04b9acf32657542fc21b23..6f11b79c58c3f1b7c11852150fb648ec59c1bb24 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,12 @@
 
 NAME = network
-VER  = 0.99.0
+VER  = 001
 
 DESTDIR=
 
+# File to store the version number in.
+VERSION_FILE = $(DESTDIR)/lib/network/version
+
 all:
        @echo "Nothing to do here."
 
@@ -27,6 +30,11 @@ install:
        ln -svf ip-updown ${DESTDIR}/etc/ppp/ipv6-down
        install -m 755 -v ppp/dialer $(DESTDIR)/etc/ppp
 
+       # Create the version file.
+       : > ${VERSION_FILE}
+       echo "# This file is automatically generated." >> ${VERSION_FILE}
+       echo "NETWORK_VERSION=$(VER)" >> ${VERSION_FILE}
+
 dist:
        git archive --format tar --prefix $(NAME)-$(VER)/ HEAD | gzip -9 > \
                $(NAME)-$(VER).tar.gz
index befdd14555318daf501c4fb49e68894f5e2447da..b1836f82d4510d3ba2db22adabcbd808dd64a6b1 100644 (file)
--- a/functions
+++ b/functions
@@ -13,6 +13,9 @@ function init_run() {
        done
 }
 
+# Include version information.
+. /lib/network/version
+
 for file in /lib/network/functions.*; do
        . ${file}
 done