#!/usr/bin/make -f

SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)
export INSTALL_PATH = /usr/share/bazel/tools/aspect_bazel_lib

%:
	dh $@

override_dh_auto_build:

override_dh_auto_install:

execute_after_dh_install:
	rm -f debian/bazel-aspect-bazel-lib$(INSTALL_PATH)/.aspect/bazelrc/.gitignore
	find debian/bazel-aspect-bazel-lib -exec touch -h -d "@$(SOURCE_DATE_EPOCH)" {} +

execute_after_dh_fixperms:
	chmod +x debian/bazel-aspect-bazel-lib$(INSTALL_PATH)/lib/private/diff_test_tmpl.sh
	chmod +x debian/bazel-aspect-bazel-lib$(INSTALL_PATH)/shlib/lib/assertions.sh
	find debian/bazel-aspect-bazel-lib -exec touch -h -d "@$(SOURCE_DATE_EPOCH)" {} +
