Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 include /usr/share/dpkg/pkg-info.mk
3
4 # export DH_VERBOSE = 1
5
6 BUILDDIR := $(CURDIR)/_build
7 METAPKG := github.com/prometheus/common
8
9 BRANCH := debian/sid
10 USER := team+pkg-go@tracker.debian.org
11 BUILD_DATE := $(shell date --utc --date='@$(SOURCE_DATE_EPOCH)' \
12 +%Y%m%d-%H:%M:%S)
13 GO_VERSION := $(shell go version | sed 's/go version \(\S*\).*/\1/')
14 BUILDTAGS :=
15 BUILDFLAGS = -tags "$(BUILDTAGS)" -ldflags " \
16 -X main.BuildCommitSha=$(BRANCH)\
17 -X main.BuildDate=$(BUILD_DATE)\
18 -X main.BuildVersion=$(DEB_VERSION)\
19 -X $(METAPKG)/version.Version=$(DEB_VERSION_UPSTREAM)\
20 -X $(METAPKG)/version.Revision=$(DEB_VERSION)\
21 -X $(METAPKG)/version.Branch=$(BRANCH)\
22 -X $(METAPKG)/version.BuildUser=$(USER)\
23 -X $(METAPKG)/version.BuildDate=$(BUILD_DATE)\
24 -X $(METAPKG)/version.GoVersion=$(GO_VERSION)"
25
26 %:
27 dh $@ --buildsystem=golang --builddirectory=$(BUILDDIR)
28
29 BINNAME := $(DEB_SOURCE)
30
31 override_dh_auto_build:
32 dh_auto_build -- $(BUILDFLAGS)
33 # Rename the binary to match the debian package.
34 mv -v $(BUILDDIR)/bin/redis_exporter $(BUILDDIR)/bin/$(BINNAME)
35
36 override_dh_auto_install:
37
38 override_dh_auto_test:
39 # The test suite requires a running redis-server.