#!/usr/bin/make -f include /usr/share/dpkg/default.mk export DH_VERBOSE=1 uversion=$(shell uscan --report --dehs |grep upstream-version | cut -d\< -f2 | cut -d\> -f2) origdir=.. orig=$(origdir)/steam_$(uversion).orig.tar.xz dest=steam-$(uversion).orig build-arch: ifneq ($(DEB_HOST_ARCH), i386) @echo "error: $(DEB_HOST_ARCH) is not a supported architecture" @exit 1 endif %: dh $@ override_dh_auto_configure: ./debian/scripts/templates-helper # 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_strip: # Valve's binaries have no symbols, so a dbgsym package is not useful dh_strip --no-automatic-dbgsym override_dh_dwz: # Valve's binaries have no symbols, so a dbgsym package is not useful override_dh_clean: dh_clean -- debian/templates ./debian/scripts/copyright-helper debian/copyright.in debian/copyright # Can be set to 'beta' to fetch upstream releases that are still # considered to have beta status UPSTREAM_APT_SUITE = stable get-orig-source: @test "$(uversion)" = "" && \ echo "There is no new upstream source file." && exit 1 || true mkdir get-orig mkdir get-orig/chdist chdist -d $(CURDIR)/get-orig/chdist create steam https://repo.steampowered.com/steam $(UPSTREAM_APT_SUITE) steam cp debian/valve-steam-keyring.gpg get-orig/chdist/steam/etc/apt/trusted.gpg.d/ chdist -d $(CURDIR)/get-orig/chdist apt-get steam update cd get-orig && chdist -d $(CURDIR)/get-orig/chdist apt-get steam source -d steam=1:$(uversion) rm -f $(orig) mkdir -p $(origdir)/$(dest) tar xf get-orig/steam_$(uversion).tar.gz --strip-components=1 -C $(origdir)/$(dest) rm -rf get-orig mv -v $(origdir)/$(dest)/debian/changelog $(origdir)/$(dest) mv -v $(origdir)/$(dest)/debian $(origdir)/$(dest)/valve-packaging rm -fv $(origdir)/$(dest)/steam cd $(origdir)/$(dest) && tar -xvf bootstrap*.tar.* rm -fvr $(origdir)/$(dest)/bootstrap*.tar.* rm -fvr $(origdir)/$(dest)/linux32/steamerrorreporter rm -fvr $(origdir)/$(dest)/ubuntu12_32/crashhandler.so rm -fvr $(origdir)/$(dest)/ubuntu12_32/steam-runtime tar -C $(origdir) -cJf $(orig) $(dest) rm -rf $(origdir)/$(dest) @echo "Successfully created new upstream source file: $(orig)"