#!/usr/bin/make -f
# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
# package maintainers to append LDFLAGS
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

#DISTRIB := $(shell lsb_release -is)

%:
	dh $@

override_dh_auto_configure:
	./autogen.sh
	dh_auto_configure

override_dh_auto_install:
	@echo DH_AUTO_INSTALL_OVERRIDE
	dh_auto_install
	rm debian/libnfsidmap-regex/usr/lib/*-*-*/regex.la
	rm debian/libnfsidmap-regex/usr/lib/*-*-*/regex.a
#ifeq ($(DISTRIB),Ubuntu)
#	@echo UBUNTU SPECIAL DIRECTORY HACK
#	mkdir -p debian/libnfsidmap-regex/lib/x86_64-linux-gnu/libnfsidmap/
#	mv debian/libnfsidmap-regex/usr/lib/x86_64-linux-gnu/regex.* debian/libnfsidmap-regex/lib/x86_64-linux-gnu/libnfsidmap/
#else
#	@echo NO UBUNTU, NO HACK
#endif
