Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 # -*- Mode: makefile -*-
3 include /usr/share/dpkg/pkg-info.mk
4
5 # Uncomment this to turn on verbose mode.
6 #export DH_VERBOSE=1
7
8 # Include test fixtures.
9 export DH_GOLANG_INSTALL_EXTRAscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/DH_GOLANG_INSTALL_EXTRA. := \
10 cmd/prometheus/testdata \
11 cmd/promtool/testdata \
12 config/testdata \
13 discovery/file/fixtures \
14 discovery/http/fixtures \
15 discovery/moby/testdata \
16 discovery/puppetdb/fixtures \
17 documentation/examples/prometheus-agent.yml \
18 documentation/examples/prometheus.yml \
19 model/rulefmt/testdata \
20 promql/fuzz-data \
21 rules/fixtures \
22 scrape/testdata \
23 tsdb/testdata \
24 # EOL
25
26 # Do not build examples
27 export DH_GOLANG_EXCLUDESscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/DH_GOLANG_EXCLUDES. := documentation storage/remote/azuread
28 # Disable OTLP Ingestion
29 export DH_GOLANG_EXCLUDESscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/DH_GOLANG_EXCLUDES. += storage/remote/otlptranslator
30
31 BUILDDIRscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILDDIR. := $(CURDIRscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/CURDIR.)/.build
32 PKGscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/PKG. := github.com/prometheus/prometheus
33 METAPKGscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/METAPKG. := github.com/prometheus/common
34
35 BRANCHscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BRANCH. := debian/sid
36 USERscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/USER. := team+pkg-go@tracker.debian.org
37 BUILD_DATEscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILD_DATE. = $(shellscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/shell. date --utc --date='@$(SOURCE_DATE_EPOCH)' \
38 +%Y%m%d-%H:%M:%S)
39 GO_VERSIONscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/GO_VERSION. = $(shellscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/shell. go version | sed 's/go version \(\S*\).*/\1/')
40 BUILDFLAGSscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILDFLAGS. = -ldflags \
41 " -X $(METAPKG)/version.Version=$(DEB_VERSION_UPSTREAM)\
42 -X $(METAPKG)/version.Revision=$(DEB_VERSION)\
43 -X $(METAPKG)/version.Branch=$(BRANCH)\
44 -X $(METAPKG)/version.BuildUser=$(USER)\
45 -X $(METAPKG)/version.BuildDate=$(BUILD_DATE)\
46 -X $(METAPKG)/version.GoVersion=$(GO_VERSION)"
47
48 ifeq ($(DEB_HOST_ARCH_CPUscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/DEB_HOST_ARCH_CPU.),arm)
49 # Tests in armel take way too long, and run out of memory in armhf.
50 TESTFLAGS := -timeout 60m -short
51 else ifeq ($(DEB_HOST_ARCH_CPUscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/DEB_HOST_ARCH_CPU.),mips64el)
52 # mips64el is also super slow
53 TESTFLAGS := -timeout 60m -short
54 else ifeq ($(DEB_HOST_ARCH_CPUscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/DEB_HOST_ARCH_CPU.),riscv64)
55 # Override gcflags to workaround https://github.com/golang/go/issues/63167
56 TESTFLAGS := -timeout 60m -short -gcflags=all=-d=wrapglobalmapctl=1
57 else
58 TESTFLAGS := -timeout 60m
59 endif
60
61 %scip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/`%`().:
62 dh $@ --buildsystem=golang --builddirectory=$(BUILDDIRscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILDDIR.)
63
64 PROMPBscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/PROMPB. := $(BUILDDIRscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILDDIR.)/src/$(PKGscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/PKG.)/prompb
65
66 override_dh_auto_configurescip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/override_dh_auto_configure().:
67 dh_auto_configurescip-debian debian debhelper . dh_auto_configure(). -- $(BUILDFLAGSscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILDFLAGS.)
68 protoc --gogofast_out=plugins=grpc:$(PROMPBscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/PROMPB.) \
69 -I$(PROMPBscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/PROMPB.) \
70 -I$(BUILDDIRscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILDDIR.)/src/github.com/gogo/protobuf \
71 $(PROMPBscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/PROMPB.)/*.proto
72 # Restore docker SD test fixture filename for older build-deps
73 ln -s json.json \
74 $(BUILDDIRscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILDDIR.)/src/$(PKGscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/PKG.)/discovery/moby/testdata/dockerprom/containers/json_limit_0.json
75 # Copy vendored packages
76 cp -a debian/vendor $(BUILDDIRscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILDDIR.)/src/$(PKGscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/PKG.)/
77
78 # Exclude package without non-test files.
79 override_dh_auto_buildscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/override_dh_auto_build().: DH_GOLANG_EXCLUDES += tsdb/test
80 override_dh_auto_buildscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/override_dh_auto_build().:
81 dh_auto_buildscip-debian debian debhelper . dh_auto_build(). -- $(BUILDFLAGSscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILDFLAGS.)
82
83 MAN_WHATISscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/MAN_WHATIS. := "prometheus \\- The Prometheus monitoring server"
84 MAN_WHATIS_TOOLscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/MAN_WHATIS_TOOL. := "promtool \\- Tooling for the Prometheus monitoring system"
85 MAN_DATEscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/MAN_DATE. := $(shellscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/shell. date --utc --date='@$(SOURCE_DATE_EPOCH)' '+%B %Y')
86
87 execute_before_dh_installmanscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/execute_before_dh_installman().:
88 $(BUILDDIRscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILDDIR.)/bin/prometheus --help-man > $(BUILDDIRscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILDDIR.)/prometheus.1
89 $(BUILDDIRscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILDDIR.)/bin/promtool --help-man > $(BUILDDIRscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILDDIR.)/promtool.1
90 # Fix title and header footers.
91 sed -i '/^.TH .*/c.TH PROMETHEUS "1" "$(MAN_DATEscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/MAN_DATE.)" "$(DEB_SOURCEscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/DEB_SOURCE.) $(DEB_VERSION_UPSTREAMscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/DEB_VERSION_UPSTREAM.)" "Prometheus"/' \
92 $(BUILDDIRscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILDDIR.)/prometheus.1
93 sed -i '/^.TH .*/c.TH PROMTOOL "1" "$(MAN_DATEscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/MAN_DATE.)" "$(DEB_SOURCEscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/DEB_SOURCE.) $(DEB_VERSION_UPSTREAMscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/DEB_VERSION_UPSTREAM.)" "Prometheus"/' \
94 $(BUILDDIRscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILDDIR.)/promtool.1
95 # Remove build user/build date/go version headers, which is ugly.
96 sed -i '/^ /d' $(BUILDDIRscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILDDIR.)/*.1
97 # Fix whatis entries.
98 sed -i '/^.SH "NAME"/,+1c.SH "NAME"\n'$(MAN_WHATISscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/MAN_WHATIS.) $(BUILDDIRscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILDDIR.)/prometheus.1
99 sed -i '/^.SH "NAME"/,+1c.SH "NAME"\n'$(MAN_WHATIS_TOOLscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/MAN_WHATIS_TOOL.) $(BUILDDIRscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILDDIR.)/promtool.1
100 # Remove default values, as they create unwieldy long lines.
101 sed -i 's/\\fB--\(.*\)=".*"\\fR/\\fB--\1\\fR/' $(BUILDDIRscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/BUILDDIR.)/*.1
102
103 override_dh_auto_testscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/override_dh_auto_test().:
104 dh_auto_testscip-debian debian debhelper . dh_auto_test(). -- $(TESTFLAGSscip-debian debian prometheus 2.53.5+ds1-5 prometheus/rules/TESTFLAGS.)