File: rules

package info (click to toggle)
prometheus-mongodb-exporter 1.0.0%2Bgit20180522.e755a44-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 760 kB
  • sloc: sh: 83; makefile: 33
file content (26 lines) | stat: -rwxr-xr-x 677 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

# Uncomment this to turn on verbose mode.
#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 \
            --builddirectory=$(BUILDDIR)

BINNAME := $(DEB_SOURCE)

execute_after_dh_auto_build:
	# 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