File: rules

package info (click to toggle)
kel-agent 0.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 256 kB
  • sloc: makefile: 41; sh: 11
file content (16 lines) | stat: -rwxr-xr-x 562 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

BUILDTIME = $(shell date --date='@${SOURCE_DATE_EPOCH}' --utc +'%Y-%m-%dT%H:%M:%SZ')
GITCOMMIT = $(shell autorevision -f -o autorevision.cache -s VCS_SHORT_HASH)
GO_LDFLAGS := "-X 'main.Version=$(DEB_VERSION_UPSTREAM)' -X 'main.GitCommit=$(GITCOMMIT)' -X 'main.BuildTime=$(BUILDTIME)'"

%:
	dh $@ --builddirectory=_build --buildsystem=golang --with=golang

override_dh_auto_build:
	dh_auto_build -O--buildsystem=golang -- --ldflags $(GO_LDFLAGS)

override_dh_auto_install:
	dh_auto_install -- --no-source