aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRubén Beltrán del Río <jj@r.bdr.sh>2026-01-18 17:04:18 +0100
committerRubén Beltrán del Río <jj@r.bdr.sh>2026-01-18 17:45:47 +0100
commit1498b8b2acde9a20da08a009fa94bc2e6c80223b (patch)
tree116f7c29edc2213867087e71d9f5498a0e7899f5 /Makefile
parente22e1210b117c95f3aa7f877b3217c623f7bcfa9 (diff)
Allow cleanup to prevent space issues
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 18 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index e7e7bd4..587d164 100644
--- a/Makefile
+++ b/Makefile
@@ -31,6 +31,7 @@ fedora_versions := fedora42 fedora43 fedora-rawhide
debian_versions := bookworm trixie forky
all_containers := arch $(fedora_versions) $(debian_versions)
container_image_prefix := map-build
+clean_images := 0
# Config: Release Location #####################################################
deploy_host := deploy@build.r.bdr.sh
@@ -180,7 +181,7 @@ endif
# Podman wrappers for distro-specific builds
#
-package-pacman-podman:
+package-pacman-podman: build-container-arch
@echo "=== Building Arch package for $(arch) ==="
podman run --rm -v $(CURDIR):/src:Z -w /src $(container_image_prefix):arch bash -c '\
staging=$$(mktemp -d) && \
@@ -188,31 +189,42 @@ package-pacman-podman:
chown -R builder:builder $$staging && \
su builder -c "cd $$staging && make -e profile=$(profile) -e channel=$(channel) -e target=$(target) package-pacman" && \
cp $$staging/$(app_name)-$(arch)-$(channel)-arch.pkg.tar.gz /src/'
+ifeq ($(clean_images),1)
+ podman rmi $(container_image_prefix):arch
+endif
package-rpm-podman:
ifndef distro
$(error distro is required, e.g., make package-rpm-podman distro=fedora43)
endif
+ $(MAKE) build-container-$(distro)
@echo "=== Building RPM for $(distro) ($(arch)) ==="
podman run --rm -v $(CURDIR):/src:Z -w /src $(container_image_prefix):$(distro) \
- make -e profile=$(profile) -e channel=$(channel) -e target=$(target) -e distro=$(distro) package-rpm
+ make package-rpm
+ifeq ($(clean_images),1)
+ podman rmi $(container_image_prefix):$(distro)
+endif
package-deb-podman:
ifndef distro
$(error distro is required, e.g., make package-deb-podman distro=bookworm)
endif
+ $(MAKE) build-container-$(distro)
@echo "=== Building DEB for $(distro) ($(arch)) ==="
podman run --rm -v $(CURDIR):/src:Z -w /src $(container_image_prefix):$(distro) \
- make -e profile=$(profile) -e channel=$(channel) -e target=$(target) -e distro=$(distro) package-deb
+ make package-deb
+ifeq ($(clean_images),1)
+ podman rmi $(container_image_prefix):$(distro)
+endif
package-rpm-all:
@for v in $(fedora_versions); do \
- $(MAKE) -e profile=$(profile) -e channel=$(channel) -e target=$(target) -e distro=$$v package-rpm-podman; \
+ $(MAKE) distro=$$v package-rpm-podman; \
done
package-deb-all:
@for v in $(debian_versions); do \
- $(MAKE) -e profile=$(profile) -e channel=$(channel) -e target=$(target) -e distro=$$v package-deb-podman; \
+ $(MAKE) distro=$$v package-deb-podman; \
done
package: package-tar package-flatpak package-appimage package-pacman-podman package-rpm-all package-deb-all
@@ -250,7 +262,7 @@ distribute: distribute-tar distribute-flatpak distribute-appimage distribute-pac
# Release ######################################################################
release:
- $(MAKE) profile=release build-containers package distribute
+ $(MAKE) profile=release package distribute
# Installation #################################################################