#!/usr/bin/make -f

# See debhelper(7) (uncomment to enable).
# Output every command that modifies files on the build system.
#export DH_VERBOSE = 1

# 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

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/buildflags.mk
DIR = $(shell pwd)/debian/parse_args

TCLVERSIONS = 8.6 9.0

%:
	dh $@

override_dh_auto_configure:
	for v in $(TCLVERSIONS) ; do \
		dh_auto_configure -B$(CURDIR)/debian/$$v -- \
			 --with-tcl=/usr/lib/tcl$$v     \
                         --prefix=/usr                  \
                         --includedir=/usr/include	\
                         --mandir=/usr/share/man	\
                         --infodir=/usr/share/info	\
                         --sysconfdir=/etc              \
                         --localstatedir=/var           \
                         --libdir=/usr/lib/tcltk/$(DEB_HOST_MULTIARCH) \
                         --libexecdir=/usr/lib/tcltk/$(DEB_HOST_MULTIARCH) \
                         --disable-maintainer-mode 	\
			 --disable-dependency-tracking ; \
	done

override_dh_auto_install:
	for v in $(TCLVERSIONS) ; do \
	    dh_auto_install -B$(CURDIR)/debian/$$v ; \
	done
