#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --exclude=.la

override_dh_auto_configure:
	if dpkg-vendor --derives-from Ubuntu; then \
	  sed -i \
	    -e '/^Description: .*$$/i Provides: bootgen-xlnx (= $${source:Version})' \
	    -e '/^Description: .*$$/i Breaks: bootgen-xlnx (<= 2022.1-0ubuntu1)' \
	    -e '/^Description: .*$$/i Replaces: bootgen-xlnx (<= 2022.1-0ubuntu1)' \
	    debian/control; \
	fi
	dh_auto_configure -- --enable-static
