#!/usr/bin/make -f export DISTRIBUTION?=buster-proposed-updates export DISTRIBUTION_FALLBACK?=buster export KFREEBSD_KERNEL_MAJOR?=10 export VERSION?=$(shell dpkg-parsechangelog | sed -n 's/^Version: //p') # Don't forget to recreate debian/control after editing these lines: $ debian/rules debian/control export MAJOR_VERSION=10 SUPPORTED_ARCHITECTURES = amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64el UNSUPPORTED_ARCHITECTURES = hurd-i386 kfreebsd-amd64 kfreebsd-i386 powerpc s390x sparc %: dh $@ override_dh_auto_install: $(SUPPORTED_ARCHITECTURES:%=get-images-%) get-images-%: if ! ./get-images.sh $* && [ -n "$(DISTRIBUTION_FALLBACK)" ]; then\ echo; echo; echo; \ echo "Version not found in $(DISTRIBUTION), falling back to $(DISTRIBUTION_FALLBACK)"; \ echo; echo; echo; \ sleep 5; \ DISTRIBUTION=$(DISTRIBUTION_FALLBACK) ./get-images.sh $*; \ fi override_dh_lintian: $(SUPPORTED_ARCHITECTURES:%=debian/debian-installer-${MAJOR_VERSION}-netboot-%.lintian-overrides) dh_lintian debian/debian-installer-%.lintian-overrides: debian/lintian-overrides.in sed -e 's/##IDENTIFIER##/$*/g' $< > $@ debian/control: debian/control.in debian/control.arch.in echo "###############################################" > $@ echo "### /!\ FILE GENERATED FROM control.in ###" >> $@ echo "### Edits shall happen in debian/control.in ###" >> $@ echo "### Re-generate this file with: ###" >> $@ echo "### $$ debian/rules debian/control ###" >> $@ echo "###############################################" >> $@ cat $< >> $@ set -e;\ for i in ${SUPPORTED_ARCHITECTURES}; do \ sed -e 's/##MAJORVERSION##/${MAJOR_VERSION}/g' -e "s/##ARCH##/$$i/g" debian/control.arch.in ;\ done >> $@ override_dh_clean: dh_clean rm -f debian/debian-installer-*.lintian-overrides .PHONY: debian/control