Use our own versioning field to make upgrades easier master v2.0
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 11 Oct 2017 19:45:35 +0000 (20:45 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 11 Oct 2017 19:45:35 +0000 (20:45 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
.gitignore
Makefile
ipfireboot.ipxe.in [moved from ipfireboot.ipxe with 70% similarity]

index 04a0ff7..1d9eb74 100644 (file)
@@ -1,2 +1,3 @@
 /bin
 /bin-x86_64-efi
+/ipfireboot.ipxe
index 1c6e8c0..cfc3d18 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@
 
+VERSION = 2.0
+
 SCRIPTS = $(CURDIR)/ipfireboot.ipxe
 MACHINE = $(shell uname -m)
 
@@ -13,10 +15,14 @@ endif
 all: $(TARGETS)
 
 clean:
-       rm -rfv $(TARGETS)
+       rm -rfv $(SCRIPTS) $(TARGETS)
        make -C ipxe/src clean veryclean
 
-$(TARGETS): config/branding.h config/general.h
+%: %.in
+       sed -e "s/@VERSION@/$(VERSION)/g" \
+               < $< > $@
+
+$(TARGETS): $(SCRIPTS) config/branding.h config/general.h
        # Copy our configuration to the gPXE submodule
        cp -vf config/* ipxe/src/config/local/
 
similarity index 70%
rename from ipfireboot.ipxe
rename to ipfireboot.ipxe.in
index e61e92d..9483d03 100644 (file)
@@ -9,4 +9,4 @@ cpuid --ext 29 && set arch x86_64 || set arch i386
 # Try to boot from DHCP.
 dhcp net0
 
-chain http://boot.ipfire.org/menu.gpxe?arch=${arch}&platform=${platform}
+chain http://boot.ipfire.org/menu.gpxe?version=@VERSION@&arch=${arch}&platform=${platform}