File: rules

package info (click to toggle)
prometheus-mongodb-exporter 1.0.0%2Bgit20180522.e755a44-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 752 kB
  • sloc: sh: 91; makefile: 35
file content (26 lines) | stat: -rwxr-xr-x 675 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk

export DH_VERBOSE=1
export DH_GOLANG_INSTALL_EXTRA := collector/fixtures

BUILDDIR := build
DH_GOPKG := github.com/dcu/mongodb_exporter

BUILDFLAGS = -ldflags \
  " -X $(DH_GOPKG)/version.Version=$(DEB_VERSION_UPSTREAM)"

%:
	dh $@ --buildsystem=golang --with=golang \
            --builddirectory=$(BUILDDIR)

BINNAME := $(DEB_SOURCE)

override_dh_auto_build:
	dh_auto_build -- $(BUILDFLAGS)
	# Rename the binary to match the debian package.
	cp -v $(BUILDDIR)/bin/mongodb_exporter $(BUILDDIR)/bin/$(BINNAME)

override_dh_auto_install:
	dh_install $(BUILDDIR)/bin/$(BINNAME) usr/bin
	dh_installman debian/$(BINNAME).1