#!/usr/bin/make -f

# Load TopGit targets if available.
-include /usr/share/topgit/tg2quilt.mk

# Let the user build rssh static if they wish.
ifneq (,$(findstring static,$(DEB_CONFIGURE_OPTIONS)))
    CONFIGURE_OPTIONS = --enable-static
else
    CONFIGURE_OPTIONS = --disable-static
endif

%:
	dh $@

override_dh_auto_configure:
	autoreconf -i
	chmod a+x conf_convert
	dh_auto_configure -- --with-scp=/usr/bin/scp --with-cvs=/usr/bin/cvs \
	    --with-sftp-server=/usr/lib/openssh/sftp-server \
	    --with-rsync=/usr/bin/rsync --with-rdist=/usr/bin/rdist \
	    --with-svnserve=/usr/bin/svnserve $(CONFIGURE_OPTIONS)

override_dh_auto_clean:
	rm -rf autom4te.cache
	dh_auto_clean

override_dh_auto_install:
	@:

override_dh_compress:
	dh_compress -Xexamples
