Current location

narf Source control manager Git

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2014-12-06 10:29:06 +0100
committerPetter Reinholdtsen <pere@hungry.com>2014-12-06 10:29:30 +0100
commit78b269e1aac36b6e1a70d7bf5e8db5d6a3a8f5e7 (patch)
treeba049d7049976f90fe18dce6859da97bbc87ea94 /Makefile
parent253453e28b9f957f3985384ba675610f0906cfd7 (diff)
parent7088815ac7f40283c631c1bdadbbe1e8352f4048 (diff)
Merge branch 'master' of github.com:freedombox/freedom-maker.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile69
1 files changed, 36 insertions, 33 deletions
diff --git a/Makefile b/Makefile
index 106ad53..0503c4a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,11 @@
#! /usr/bin/make
# Where to fetch packages
-MIRROR=http://http.debian.net/debian
-SUITE=unstable
+MIRROR = http://http.debian.net/debian
# armel amd64 i386
ARCHITECTURE = armel
-# dreamplug guruplug virtualbox
+# dreamplug guruplug virtualbox raspberry(pi)
MACHINE = dreamplug
# card usb hdd
DESTINATION = card
@@ -17,47 +16,63 @@ WEEKLY_DIR = torrent/freedombox-unstable_$(TODAY)
IMAGE = $(NAME).img
ARCHIVE = $(NAME).tar.bz2
SIGNATURE = $(ARCHIVE).sig
+SUITE = sid
+SOURCE = false
+OWNER = 1000
+TAR = tar --checkpoint=1000 --checkpoint-action=dot -cjvf
+SIGN = -gpg --output $(SIGNATURE) --detach-sig $(ARCHIVE)
# Using taskset to pin build process to single core. This is a
# workaround for a qemu-user-static issue that causes builds to
# hang. (See Debian bug #769983 for details.)
+MAKE_IMAGE = ARCHITECTURE=$(ARCHITECTURE) DESTINATION=$(DESTINATION) \
+ MACHINE=$(MACHINE) SOURCE=$(SOURCE) MIRROR=$(MIRROR) SUITE=$(SUITE) OWNER=$(OWNER) \
+ taskset 0x01 bin/mk_freedombox_image $(NAME)
# build DreamPlug USB or SD card image
-dreamplug-image: prep
+dreamplug: prep
$(eval ARCHITECTURE = armel)
$(eval MACHINE = dreamplug)
$(eval DESTINATION = card)
- ARCHITECTURE=$(ARCHITECTURE) MACHINE=$(MACHINE) DESTINATION=$(DESTINATION) \
- MIRROR=$(MIRROR) SUITE=$(SUITE) \
- taskset 0x01 bin/mk_freedombox_image $(NAME)
- tar -cjvf $(ARCHIVE) $(IMAGE)
- -gpg --output $(SIGNATURE) --detach-sig $(ARCHIVE)
+ $(MAKE_IMAGE)
+ $(TAR) $(ARCHIVE) $(IMAGE)
+ @echo ""
+ $(SIGN)
@echo "Build complete."
# build Raspberry Pi SD card image
-raspberry-image: prep
+raspberry: prep
$(eval ARCHITECTURE = armel)
$(eval MACHINE = raspberry)
$(eval DESTINATION = card)
- ARCHITECTURE=$(ARCHITECTURE) MACHINE=$(MACHINE) DESTINATION=$(DESTINATION) \
- MIRROR=$(MIRROR) SUITE=$(SUITE) \
- taskset 0x01 bin/mk_freedombox_image $(NAME)
- tar -cjvf $(ARCHIVE) $(IMAGE)
- -gpg --output $(SIGNATURE) --detach-sig $(ARCHIVE)
+ $(MAKE_IMAGE)
+ $(TAR) $(ARCHIVE) $(IMAGE)
+ @echo ""
+ $(SIGN)
+ @echo "Build complete."
+
+# build Beaglebone SD card image
+beaglebone: prep
+ $(eval ARCHITECTURE = armhf)
+ $(eval MACHINE = beaglebone)
+ $(eval DESTINATION = card)
+ $(MAKE_IMAGE)
+ $(TAR) $(ARCHIVE) $(IMAGE)
+ @echo ""
+ $(SIGN)
@echo "Build complete."
# build a virtualbox image
-virtualbox-image: prep
+virtualbox: prep
$(eval ARCHITECTURE = i386)
$(eval MACHINE = virtualbox)
$(eval DESTINATION = hdd)
- ARCHITECTURE=$(ARCHITECTURE) MACHINE=$(MACHINE) DESTINATION=$(DESTINATION) \
- MIRROR=$(MIRROR) SUITE=$(SUITE) \
- 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
+ @echo ""
+ $(SIGN)
@echo "Build complete."
vendor/vmdebootstrap/vmdebootstrap: vendor-patches/vmdebootstrap/*.patch
@@ -72,15 +87,3 @@ clean:
distclean: clean
sudo rm -rf build
-
-weekly-image: dreamplug-image raspberry-image virtualbox-image
- mkdir -p $(WEEKLY_DIR)
- mv build/*bz2 build/*sig $(WEEKLY_DIR)
- cp weekly_template.org $(WEEKLY_DIR)/README.org
- echo "http://betweennowhere.net/freedombox-images/$(WEEKLY_DIR)" > torrent/webseed
- @echo ""
- @echo "----------"
- @echo "When the README has been updated, hit Enter."
- read X
- mktorrent -a `cat torrent/trackers` -w `cat torrent/webseed` $(WEEKLY_DIR)
- mv $(WEEKLY_DIR).torrent torrent/