Add the ability to adjust the thread count of xz, drop -e

`xz --extreme` would only save us about 1MB but take ~50% longer.
This commit is contained in:
Justin Kromlinger 2020-07-30 17:55:36 +02:00
parent 026d2788df
commit cbaf17832e
No known key found for this signature in database
GPG Key ID: 69EF6D9E49A64EB8

View File

@ -4,6 +4,8 @@ DOCKER_IMAGE:=base
BUILDDIR=build
PWD=$(shell pwd)
XZ_THREADS ?= 0
hooks:
mkdir -p alpm-hooks/usr/share/libalpm/hooks
find /usr/share/libalpm/hooks -exec ln -sf /dev/null $(PWD)/alpm-hooks{} \;
@ -30,8 +32,7 @@ rootfs: hooks
archlinux.tar: rootfs
compress-rootfs: archlinux.tar
xz -f archlinux.tar
xz -9e -T0 -f archlinux.tar
xz -9 -T"$(XZ_THREADS)" -f archlinux.tar
docker-image: compress-rootfs
docker build -t $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE) .