]> git.plutz.net Git - blast/blobdiff - modules/approx.mk
introduce approxhost config variable
[blast] / modules / approx.mk
index 471cf31775277e12f8eaac67465dbf5b05399a5a..05bda84badab938ea853b98b93fb71e69c260b17 100644 (file)
@@ -3,6 +3,10 @@ ${SOURCES}
 endef
 export approx_original_sources
 
+ifndef approxhost
+  approxhost := localhost
+endif
+
 ifdef approx
   BOOTSTRAP := ${approx}
   define SOURCES =
@@ -11,15 +15,15 @@ ifdef approx
 else ifdef raspi
   BOOTSTRAP := http://localhost/raspbian
   define SOURCES :=
-  deb http://localhost/raspbian  stretch main non-free firmware rpi
-  deb http://localhost/rpidebian stretch main
-  deb http://localhost/raspbian  buster main non-free firmware rpi
-  deb http://localhost/rpidebian buster main
+  deb http://${approxhost}/raspbian  stretch main non-free firmware rpi
+  deb http://${approxhost}/rpidebian stretch main
+  deb http://${approxhost}/raspbian  buster main non-free firmware rpi
+  deb http://${approxhost}/rpidebian buster main
   endef
 else
   BOOTSTRAP := http://localhost/debian
   define SOURCES :=
-  deb http://localhost/debian ${release} main
+  deb http://${approxhost}/debian ${release} main
   endef
 endif
 
@@ -27,3 +31,4 @@ endif
 _config: _approx_restore_sources
 _approx_restore_sources: ${CFGROOT}
        printf '%s\n' "$${approx_original_sources}" >"$${CFGROOT}/etc/apt/sources.list"
+       -chroot "$${CFGROOT}" apt-get update