Files
livebuilds/Makefile
2025-09-21 22:34:48 -04:00

44 lines
919 B
Makefile

.PHONY: default configure build install clean
DIST := trixie
INFO := debian13
NAME := live_$(DIST)
PKGS := base
STOW := base
ISO := $(shell readlink -f ./builds/$(DIST)/live-image-amd64.hybrid.iso)
MEM := 16384
CPU := 2
default: configure build
configure:
mkdir -p builds/$(DIST)
cd builds/$(DIST) && \
lb config --distribution $(DIST) --debian-installer live
stow -t ./builds/$(DIST) -D $(PKGS)
stow -t ./builds/$(DIST) $(STOW)
build:
cd builds/$(DIST) && \
sudo lb clean --chroot && \
sudo lb build
install:
virt-install \
--name "$(NAME)" \
--osinfo "$(INFO)" \
--machine q35 \
--memory "$(MEM)" --vcpus "$(CPU)" \
--cpu host-model --virt-type kvm \
--cdrom "$(ISO)" \
--disk none \
--network none \
--graphics spice,listen=127.0.0.1 \
--video virtio \
--noautoconsole
clean:
virsh destroy "$(NAME)" || true
virsh undefine "$(NAME)" || true
sudo rm -rf ./builds