2 ROOT_MB := $(shell printf '%i\n' "$$(( ${imagesize} - ${BOOT_MB} - 3 ))")
5 PACKAGES := ${PACKAGES} btrfs-tools bzip2 ca-certificates cron deborphan firmware-linux-free gzip htop ifupdown iputils-ping irqbalance isc-dhcp-client less make net-tools nmap ntpdate openssh-client psmisc rsync sshfs sudo traceroute unzip vim wget wireless-tools wpasupplicant xz-utils zip
8 PACKAGES := ${PACKAGES} $(subst ${comma_},${space_},${packages})
14 keyboard-configuration keyboard-configuration/model select Generic 105-key (Intl) PC
15 keyboard-configuration keyboard-configuration/variant select English (US) - English (Macintosh)
18 .PHONY: _debconf_selections
19 _install: _debconf_selections
20 _debconf_selections: ${SYSROOT}
21 printf '%s\n' "$${DEBCONF}" |chroot "$${SYSROOT}" debconf-set-selections
23 .PHONY: _timezone _locales
27 PACKAGES := ${PACKAGES} tzdata
32 PACKAGES := ${PACKAGES} locales
37 printf '%s\n' "$${timezone}" >"$${CFGROOT}/etc/timezone"
38 ln -sf /usr/share/zoneinfo/"$${timezone}" "$${CFGROOT}/etc/localtime"
41 for l in $(subst ${comma_},${space_},${locales}); do \
42 printf '%s %s\n' "$${l}" "$${l#*.}"; \
43 done >"$${CFGROOT}/etc/locale.gen"
44 printf 'LANG=%s\n' "$(firstword $(subst ${comma_},${space_},${locales}))" >"$${CFGROOT}/etc/default/locale"
45 chroot "$${CFGROOT}" locale-gen
47 .PHONY: _rootpass _users
59 chroot "$${CFGROOT}" usermod -p "$$(openssl passwd "$${rootpass}")" root
62 for u in $(subst ${comma_},${space_},${users}); do \
63 chroot "$${CFGROOT}" useradd -m -s /bin/bash -p "$$(openssl passwd "")" "$$u"; \
69 ${CFGROOT}/etc/network/interfaces.d/wifi: ${CFGROOT}
70 printf 'auto wlan0\nallow-hotplug wlan0\n\niface wlan0 inet dhcp\n' >$@
71 printf ' wpa-ssid "%s"\n wpa-psk "%s"\n' "$$wifi" "$$wifipass" >>$@
74 ${CFGROOT}/etc/network/interfaces.d/wifi: ${CFGROOT}
75 printf 'auto wlan0\nallow-hotplug wlan0\n\niface wlan0 inet dhcp\n' >$@
76 printf ' wireless-ssid "%s"\n' "$$wifi" >>$@
78 _config: ${CFGROOT}/etc/network/interfaces.d/wifi