#!/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


%:
	dh $@


# dh_make generated override targets.
# This is an example for Cmake (see <https://bugs.debian.org/641051>).
override_dh_auto_install:
	make altinstall DESTDIR=debian/python2.7
	mv debian/python2.7/usr/bin/2to3 debian/python2.7/usr/bin/2to32.7  
	mv debian/python2.7/usr/bin/idle debian/python2.7/usr/bin/idle2.7
	mv debian/python2.7/usr/bin/pydoc debian/python2.7/usr/bin/pydoc2.7
	mv debian/python2.7/usr/bin/python-config.sh debian/python2.7/usr/bin/python2.7-config.sh
	mv debian/python2.7/usr/bin/smtpd.py debian/python2.7/usr/bin/smtpd2.7.py
	mkdir -p debian/python2.7/usr/lib/x86_64-linux-gnu/pkgconfig/
	mv debian/python2.7/usr/lib/x86_64-linux-gnu/x86_64-linux-gnu/pkgconfig/python-2.7.pc debian/python2.7/usr/lib/x86_64-linux-gnu/pkgconfig/
	rm -rf debian/python2.7/usr/lib/x86_64-linux-gnu/x86_64-linux-gnu/
#override_dh_install:
#	make altinstall DESTDIR=debian/python2.7
override_dh_auto_test:
	echo "no test"
#override_dh_test:
#	echo "no test"
override_dh_auto_clean:
	if [ -f Makefile ]; then make distclean ; patch -R -p1 < debian/patches/unpatch.patch; fi
override_dh_strip:
	echo "no"
#override_dh_clean:
#	if [ -f Makefile ]; then make distclean; fi

#	-DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
