#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs,--as-needed

%:
	dh $@ --without autoreconf

override_dh_auto_configure:
	dh_auto_configure -- \
		--with-external-libupnp \
		--with-external-talloc \

override_dh_auto_install:
	dh_auto_install
	chrpath -d $(CURDIR)/debian/djmount/usr/bin/djmount

override_dh_auto_test:

override_dh_auto_clean:
	[ ! -f Makefile ] || $(MAKE) clean-generic distclean-am distclean-libtool
	rm -rfv gl/Makefile
	rm -rfv gl/.libs
	rm -rfv gl/*.la
	rm -rfv gl/*.lo
	rm -rfv gl/*.o
