]> git.plutz.net Git - blast/blob - modules/approx.mk
default packages
[blast] / modules / approx.mk
1 define approx_original_sources :=
2 ${SOURCES}
3 endef
4 export approx_original_sources
5
6 ifndef approxhost
7   approxhost := localhost
8 endif
9
10 approxrepos := main
11 approxrepos += $(findstring contrib, ${SOURCES})
12 approxrepos += $(findstring non-free-fimware, ${SOURCES})
13 #approxrepos += $(findstring non-free, ${SOURCES})
14
15 ifdef approx
16   BOOTSTRAP := ${approx}
17   define SOURCES =
18   deb ${approx} ${release} ${approxrepos}
19   deb ${approx} ${release}-backports ${approxrepos}
20   endef
21 else ifdef raspi
22   BOOTSTRAP := http://localhost/raspbian
23   define SOURCES :=
24   deb http://${approxhost}/raspbian  stretch main non-free firmware rpi
25   deb http://${approxhost}/rpidebian stretch main
26   deb http://${approxhost}/raspbian  buster main non-free firmware rpi
27   deb http://${approxhost}/rpidebian buster main
28   endef
29 else
30   BOOTSTRAP := http://localhost/debian
31   define SOURCES :=
32   deb http://${approxhost}/debian ${release} ${approxrepos}
33   endef
34 endif
35
36 .PHONY: _approx_restore_sources
37 _config: _approx_restore_sources
38 _approx_restore_sources: ${CFGROOT}
39         printf '%s\n' "$${approx_original_sources}" >"$${CFGROOT}/etc/apt/sources.list"
40         -chroot "$${CFGROOT}" apt-get update