#!/usr/bin/make -f

%:
	dh $@

# Makefile does not follow any conventions
override_dh_auto_install:
	true

override_dh_strip:
	dh_strip -Xstart.elf -Xstart4.elf

override_dh_install:
	# Copy the pinned firmware version
	rm -rf temp
	mkdir -p temp/firmware/2711
	mkdir -p temp/firmware/2712

	cp firmware/2711/pieeprom.bin temp/firmware/2711/pieeprom.bin
	cp firmware/2711/recovery.bin temp/firmware/2711/recovery.bin
	cp firmware/2712/pieeprom.bin temp/firmware/2712/pieeprom.bin
	cp firmware/2712/recovery.bin temp/firmware/2712/recovery.bin
	dh_install
	find $(CURDIR)/debian -name .gitignore -delete
	rm -rf temp
