#!/usr/bin/make -f include /usr/share/dpkg/pkg-info.mk export DH_GOLANG_BUILDPKG := \ github.com/pranshuparmar/witr/cmd/witr \ github.com/pranshuparmar/witr/internal/tools/docgen export DH_GOLANG_INSTALL_EXTRA := internal/version/VERSION BUILD_DATE := $(shell date --utc --date="@$(SOURCE_DATE_EPOCH)" "+%Y-%m-%d") LD_FLAGS := \ -X 'github.com/pranshuparmar/witr/internal/version.Version=v$(DEB_VERSION_UPSTREAM)' \ -X 'github.com/pranshuparmar/witr/internal/version.BuildDate=$(BUILD_DATE)' %: dh $@ --builddirectory=debian/build --buildsystem=golang override_dh_auto_build: dh_auto_build -- -ldflags "$(LD_FLAGS)" execute_after_dh_auto_build: ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_build endif debian/build/bin/docgen -format man override_dh_auto_install: dh_auto_install -- --no-source rm -f debian/witr/usr/bin/docgen