Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 include /usr/share/dpkg/pkg-info.mk
4
5 BUILDTIME = $(shell date --date='@${SOURCE_DATE_EPOCH}' --utc +'%Y-%m-%dT%H:%M:%SZ')
6 GITCOMMIT = $(shell autorevision -f -o autorevision.cache -s VCS_SHORT_HASH)
7 GO_LDFLAGS := "-X 'main.Version=$(DEB_VERSION_UPSTREAM)' -X 'main.GitCommit=$(GITCOMMIT)' -X 'main.BuildTime=$(BUILDTIME)'"
8
9 %:
10 dh $@ --builddirectory=_build --buildsystem=golang --with=golang
11
12 override_dh_auto_build:
13 dh_auto_build -O--buildsystem=golang -- --ldflags $(GO_LDFLAGS)
14
15 override_dh_auto_install:
16 dh_auto_install -- --no-source