2023-04-16 23:18:02 +02:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
# apparmor.d - Full set of apparmor profiles
|
|
|
|
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
|
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
|
|
|
|
# Usage:
|
|
|
|
# make archlinux flavor=gnome
|
2023-04-30 17:27:34 +02:00
|
|
|
# vagrant up arch-gnome
|
|
|
|
# vagrant ssh archl-gnome
|
2023-04-16 23:18:02 +02:00
|
|
|
|
|
|
|
# Build variables
|
|
|
|
flavor ?=
|
|
|
|
disk ?= 10G
|
|
|
|
|
|
|
|
VERSION := 0.$(shell git rev-list --count HEAD)-1
|
|
|
|
PACKERS = $(notdir $(patsubst %.pkr.hcl,%,$(wildcard packer/*.pkr.hcl)))
|
|
|
|
|
|
|
|
.PHONY: ${PACKERS} lint
|
|
|
|
|
|
|
|
$(PACKERS):
|
2023-04-30 17:27:34 +02:00
|
|
|
make --directory=../ package dist=${@}
|
|
|
|
packer build -force -var version=${VERSION} \
|
|
|
|
-var disk_size=${disk} -var flavor="${flavor}" \
|
|
|
|
-only=main.qemu.${@}-${flavor} packer/
|
2023-04-16 23:18:02 +02:00
|
|
|
|
|
|
|
lint:
|
|
|
|
@packer fmt packer/
|
|
|
|
@packer validate packer/
|