#!/usr/bin/make -f
#export DH_VERBOSE=1

# The autotools in squeeze (Debian 6) are too old, so don't use autoreconf.
ifeq ($(shell cut -c1 /etc/debian_version),6)
AUTORECONF =
else
AUTORECONF = --with autoreconf
endif

%:
	dh $@ --parallel $(AUTORECONF)

override_dh_auto_configure:
	dh_auto_configure -- $(shell DEB_LDFLAGS_MAINT_APPEND="-Wl,-z,defs" \
		DEB_CFLAGS_MAINT_APPEND="-D_FILE_OFFSET_BITS=64" dpkg-buildflags --export=configure) \
		--disable-clamav --without-pcre

override_dh_auto_build-arch:
	dh_auto_build -a -- V=1

override_dh_auto_install:
	dh_auto_install
	rm debian/libclamunrar7/usr/lib/*.la
	rm debian/libclamunrar7/usr/lib/*.so
