#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
include /usr/share/dpkg/architecture.mk
export PKG_CONFIG=$(DEB_HOST_GNU_TYPE)-pkg-config

%:
	dh $@ --without autoreconf --with autotools_dev

override_dh_auto_configure:
	dh_auto_configure -- --libexecdir=/usr/lib

override_dh_auto_install:
	dh_auto_install --destdir=$(CURDIR)/debian/xarchiver
	# removing useless files
	rm -f debian/xarchiver/usr/share/doc/xarchiver/AUTHORS
	rm -f debian/xarchiver/usr/share/doc/xarchiver/COPYING
	rm -f debian/xarchiver/usr/share/doc/xarchiver/NEWS
	rm -f debian/xarchiver/usr/share/doc/xarchiver/README
	rm -f debian/xarchiver/usr/share/doc/xarchiver/ChangeLog
	rm -f debian/xarchiver/usr/share/doc/xarchiver/TODO

get-orig-source:
	uscan --download-current-version --force-download
