#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk

pre-build::
	chmod +x init mkinitramfs
	chmod +x hooks/*
	for x in `find scripts/ -maxdepth 1 -type d | tail -n+2`; do \
	  chmod -R +x $$x; \
	done

install/initramfs-tools::
	mkdir -p debian/initramfs-tools/usr/share/initramfs-tools/scripts/panic
	sed -e "/^OPTION=/d" \
		< scripts/init-top/keymap \
		> debian/initramfs-tools/usr/share/initramfs-tools/scripts/panic/keymap

build/initramfs-tools-bin::
	make -C src

cleanbuilddir/initramfs-tools-bin::
	make -C src clean
