#!/usr/bin/make -f
%:
	dh $@

override_dh_auto_configure:
ifeq ($(DEB_BUILD_ARCH), amd64)
	CC="gcc-4.5" dh_auto_configure -- --enable-win64
else
	CC="gcc-4.5" dh_auto_configure
endif

override_dh_auto_test:
	# Wine's test suite does not pass on build daemons, skip it for now

override_dh_installdocs:
	# wine1.4 package should be a dependency of every subpackage here
	dh_installdocs --link-doc=wine1.4

override_dh_install:
	dh_install --fail-missing
	# These files will end up in multiple packages otherwise
	rm -f debian/wine1.4/usr/bin/wine
	rm -f debian/wine1.4/usr/bin/wine-preloader
	rm -f debian/wine1.4/usr/bin/wine64
	rm -f debian/wine1.4/usr/bin/wine64-preloader

override_dh_strip:
	dh_strip -Xwine-pthread -Xwine-kthread --dbg-package=wine1.4-dbg

