#!/usr/bin/make -f

include /usr/share/dpkg/default.mk

export DH_VERBOSE=1

%:
	dh $@

override_dh_auto_configure:
ifeq ($(filter amd64 i386,$(DEB_HOST_ARCH)),)
	@echo "error: $(DEB_HOST_ARCH) is not a supported architecture"
	@exit 1
endif

# We don't use Valve's build system
override_dh_auto_build:
	sed \
		-e 's,STEAMSCRIPT_VERSION=.*,STEAMSCRIPT_VERSION='"'"'$(DEB_VERSION_UPSTREAM_REVISION)/$(DEB_VENDOR)'"'"',' \
		< debian/scripts/steam.in > debian/scripts/steam
override_dh_auto_install:
	:
override_dh_auto_test:
	:

override_dh_installdocs:
ifeq ($(DEB_HOST_ARCH),i386)
	dh_installdocs -psteam --link-doc=steam-installer
endif
	dh_installdocs --remaining-packages
