#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/vendor.mk
export DEB_VERSION

TARNAME = ftpsync_$(DEB_VERSION_UPSTREAM_REVISION)_all.tar.gz

%:
	dh $@

override_dh_auto_install:
	dh_auto_install
ifeq ($(DEB_VENDOR),Debian)
	$(MAKE) install-tar DESTDIR=debian/ftpsync-tar/distrib
endif

override_dh_builddeb:
	dh_builddeb
ifeq ($(DEB_VENDOR),Debian)
	tar -c -C debian/ftpsync-tar distrib | gzip -n > ../$(TARNAME)
	dpkg-distaddfile $(TARNAME) byhand -
endif
