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
|