]> git.plutz.net Git - blast/blobdiff - modules/approx.mk
changes from master
[blast] / modules / approx.mk
index c8ed445096bc2cf8c5397dabd472e258b614692e..f7541d7d231d3cde159a4882e0101d9a4d4240d8 100644 (file)
@@ -3,31 +3,36 @@ ${SOURCES}
 endef
 export approx_original_sources
 
-ifdef approx
+ifndef approxhost
+  approxhost := localhost
+endif
 
-BOOTSTRAP := ${approx}
-define SOURCES =
-deb ${approx} stretch main
-endef
+approxrepos := main
+approxrepos += $(findstring contrib, ${SOURCES})
+approxrepos += $(findstring non-free, ${SOURCES})
 
+ifdef approx
+  BOOTSTRAP := ${approx}
+  define SOURCES =
+  deb ${approx} ${release} ${approxrepos}
+  endef
 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
-endef
-
+  BOOTSTRAP := http://localhost/raspbian
+  define SOURCES :=
+  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 stretch main
-endef
-
+  BOOTSTRAP := http://localhost/debian
+  define SOURCES :=
+  deb http://${approxhost}/debian ${release} ${approxrepos}
+  endef
 endif
 
 .PHONY: _approx_restore_sources
 _config: _approx_restore_sources
 _approx_restore_sources: ${CFGROOT}
        printf '%s\n' "$${approx_original_sources}" >"$${CFGROOT}/etc/apt/sources.list"
+       -chroot "$${CFGROOT}" apt-get update