Current location

narf Source control manager Git

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2014-05-19 14:54:37 +0200
committerPetter Reinholdtsen <pere@hungry.com>2014-05-19 14:54:37 +0200
commit84ff452abf66eb7f31097418240e21e10d8b977c (patch)
treed0189f6a6528d91e3fdf29b7ee74c30b4267abf6
parente2cdebc2407efc6a01c1126face14fffc4fb9273 (diff)
Move Debian mirror and suite setting to Makefile, alongside the other build settings.
-rw-r--r--Makefile7
-rwxr-xr-xbin/mk_freedombox_image6
2 files changed, 11 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index be33e6a..23e7ab9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,9 @@
#! /usr/bin/make
+# Where to fetch packages
+MIRROR=http://http.debian.net/debian
+SUITE=jessie
+
# armel amd64 i386
ARCHITECTURE = armel
# dreamplug guruplug virtualbox
@@ -20,6 +24,7 @@ dreamplug-image: prep
$(eval MACHINE = dreamplug)
$(eval DESTINATION = card)
ARCHITECTURE=$(ARCHITECTURE) MACHINE=$(MACHINE) DESTINATION=$(DESTINATION) \
+ MIRROR=$(MIRROR) SUITE=$(SUITE) \
bin/mk_freedombox_image $(NAME)
tar -cjvf $(ARCHIVE) $(IMAGE)
-gpg --output $(SIGNATURE) --detach-sig $(ARCHIVE)
@@ -31,6 +36,7 @@ raspberry-image: prep
$(eval MACHINE = raspberry)
$(eval DESTINATION = card)
ARCHITECTURE=$(ARCHITECTURE) MACHINE=$(MACHINE) DESTINATION=$(DESTINATION) \
+ MIRROR=$(MIRROR) SUITE=$(SUITE) \
bin/mk_freedombox_image $(NAME)
tar -cjvf $(ARCHIVE) $(IMAGE)
-gpg --output $(SIGNATURE) --detach-sig $(ARCHIVE)
@@ -42,6 +48,7 @@ virtualbox-image: prep
$(eval MACHINE = virtualbox)
$(eval DESTINATION = hdd)
ARCHITECTURE=$(ARCHITECTURE) MACHINE=$(MACHINE) DESTINATION=$(DESTINATION) \
+ MIRROR=$(MIRROR) SUITE=$(SUITE) \
bin/mk_freedombox_image $(NAME)
# Convert image to vdi hard drive
VBoxManage convertdd $(NAME).img $(NAME).vdi
diff --git a/bin/mk_freedombox_image b/bin/mk_freedombox_image
index ec3b36f..d2c2bab 100755
--- a/bin/mk_freedombox_image
+++ b/bin/mk_freedombox_image
@@ -24,8 +24,10 @@ basedir=`pwd`
vendor_dir="${basedir}/vendor"
vmdebootstrap_dir="${vendor_dir}/vmdebootstrap"
-MIRROR=http://cdn.debian.net/debian
-SUITE=jessie
+if [ -z "$MIRROR" ] || [ -z "$SUITE" ] ; then
+ echo error: Missing MIRROR and SUITE settings inherited from Makefile.
+ exit 1
+fi
# Packages to install in all FreedomBox environments
base_pkgs="apt base-files ifupdown initramfs-tools \