#!/usr/bin/make -f

#export DH_VERBOSE = 1

INITRAMFS_LOCAL_BOTTOM_DIR=/etc/initramfs-tools/scripts/local-bottom
ROOT_RO_SCRIPT="src/root-ro"

%:
	dh $@

override_dh_auto_install:
	dh_install $(ROOT_RO_SCRIPT) $(INITRAMFS_LOCAL_BOTTOM_DIR)

override_dh_fixperms:
	dh_fixperms
	# Make root-ro script executable
	find debian -name $(ROOT_RO_SCRIPT) -exec chmod 755 {} \;

# Override the default dh_builddeb target to use xz compression ,
# otherwise when using Ubuntu for packaging .zst will be used which isn't supported in bullseye.
override_dh_builddeb:
	dh_builddeb -- -Zxz
