Current location

narf Source control manager Git

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Daly <Nick.M.Daly@gmail.com>2014-05-11 19:46:18 -0500
committerNick Daly <Nick.M.Daly@gmail.com>2014-05-11 19:46:18 -0500
commit326f5ae60c47ee0054c3c2639a654dc8712902a8 (patch)
tree60dc220331d000741f54d02fa59577ba9d877dba
parentabe727e11d9568acea26b90291631b1a5849a5c9 (diff)
Moved explicit commands into functions.
-rw-r--r--Makefile46
1 files changed, 18 insertions, 28 deletions
diff --git a/Makefile b/Makefile
index aa8d455..f4e763f 100644
--- a/Makefile
+++ b/Makefile
@@ -16,19 +16,21 @@ SIGNATURE = $(ARCHIVE).sig
SUITE = sid
SOURCE = false
OWNER = 1000
+TAR = tar --checkpoint=1000 --checkpoint-action=dot -cjvf
+MAKE_IMAGE = ARCHITECTURE=$(ARCHITECTURE) DESTINATION=$(DESTINATION) \
+ MACHINE=$(MACHINE) SOURCE=$(SOURCE) SUITE=$(SUITE) OWNER=$(OWNER) \
+ bin/mk_freedombox_image $(NAME)
+SIGN = -gpg --output $(SIGNATURE) --detach-sig $(ARCHIVE)
+
# build DreamPlug USB or SD card image
dreamplug: prep
$(eval ARCHITECTURE = armel)
$(eval MACHINE = dreamplug)
$(eval DESTINATION = card)
-
- ARCHITECTURE=$(ARCHITECTURE) DESTINATION=$(DESTINATION) MACHINE=$(MACHINE) \
- SOURCE=$(SOURCE) SUITE=$(SUITE) OWNER=$(OWNER) \
- bin/mk_freedombox_image $(NAME)
-
- tar -cjvf $(ARCHIVE) $(IMAGE)
- -gpg --output $(SIGNATURE) --detach-sig $(ARCHIVE)
+ $(MAKE_IMAGE)
+ $(TAR) $(ARCHIVE) $(IMAGE)
+ $(SIGN)
@echo "Build complete."
# build Raspberry Pi SD card image
@@ -36,13 +38,9 @@ raspberry: prep
$(eval ARCHITECTURE = armel)
$(eval MACHINE = raspberry)
$(eval DESTINATION = card)
-
- ARCHITECTURE=$(ARCHITECTURE) DESTINATION=$(DESTINATION) MACHINE=$(MACHINE) \
- SOURCE=$(SOURCE) SUITE=$(SUITE) OWNER=$(OWNER) \
- bin/mk_freedombox_image $(NAME)
-
- tar -cjvf $(ARCHIVE) $(IMAGE)
- -gpg --output $(SIGNATURE) --detach-sig $(ARCHIVE)
+ $(MAKE_IMAGE)
+ $(TAR) $(ARCHIVE) $(IMAGE)
+ $(SIGN)
@echo "Build complete."
# build Beaglebone SD card image
@@ -50,13 +48,9 @@ beaglebone: prep
$(eval ARCHITECTURE = armhf)
$(eval MACHINE = beaglebone)
$(eval DESTINATION = card)
-
- ARCHITECTURE=$(ARCHITECTURE) DESTINATION=$(DESTINATION) MACHINE=$(MACHINE) \
- SOURCE=$(SOURCE) SUITE=$(SUITE) OWNER=$(OWNER) \
- bin/mk_freedombox_image $(NAME)
-
- tar -cjvf $(ARCHIVE) $(IMAGE)
- -gpg --output $(SIGNATURE) --detach-sig $(ARCHIVE)
+ $(MAKE_IMAGE)
+ $(TAR) $(ARCHIVE) $(IMAGE)
+ $(SIGN)
@echo "Build complete."
# build a virtualbox image
@@ -64,15 +58,11 @@ virtualbox: prep
$(eval ARCHITECTURE = i386)
$(eval MACHINE = virtualbox)
$(eval DESTINATION = hdd)
-
- ARCHITECTURE=$(ARCHITECTURE) DESTINATION=$(DESTINATION) MACHINE=$(MACHINE) \
- SOURCE=$(SOURCE) SUITE=$(SUITE) OWNER=$(OWNER) \
- bin/mk_freedombox_image $(NAME)
-
+ $(MAKE_IMAGE)
# Convert image to vdi hard drive
VBoxManage convertdd $(NAME).img $(NAME).vdi
- tar -cjvf $(ARCHIVE) $(NAME).vdi
- -gpg --output $(SIGNATURE) --detach-sig $(ARCHIVE)
+ $(TAR) $(ARCHIVE) $(NAME).vdi
+ $(SIGN)
@echo "Build complete."
prep: