#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# For Hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
-include /usr/share/dpkg/buildtools.mk
export CC
export CXX
export DEBUG = 1

# Disable git calling for cleaning
export GIT_REPO = 0

%:
	dh $@

override_dh_autoreconf:
	# Because there's no auto* files shipped anymore

override_dh_auto_install:
	$(MAKE) DESTDIR=$(CURDIR)/debian/mergerfs PREFIX=/usr install STRIP=true

override_dh_gencontrol:
	dh_gencontrol -- \
	  -Vlib:Depends=$(shell dpkg-query -W -f '$${Depends}' libfuse-dev \
			| sed -E 's/.*(libfuse[[:alnum:].-]+).*/\1/')
