#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic

%:
	dh $@ --with=single-binary

# VERSION: upstream derives the version from "git describe" which reports
#   "unknown-version" when building from the release tarball. Report the Debian
#   package version instead.
# nbdkit: debhelper compat 14 passes --auto-features=enabled, which turns the
#   "auto" nbdkit feature on. The plugin is not packaged yet, so ask for it
#   explicitly to be left out.
override_dh_auto_configure:
	dh_auto_configure -- \
		-DVERSION=$(DEB_VERSION) \
		-Dnbdkit=disabled
