File: rules

package info (click to toggle)
prometheus-nginx-exporter 0.8.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,152 kB
  • sloc: sh: 49; makefile: 47
file content (17 lines) | stat: -rwxr-xr-x 483 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk

BINNAME := $(DEB_SOURCE)
BUILDDIR := $(CURDIR)/_build
BUILDFLAGS := -ldflags "-X main.version=$(DEB_VERSION)"

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

override_dh_auto_build:
	dh_auto_build -- $(BUILDFLAGS)
	# Rename the binary to match the debian package.
	mv -v $(BUILDDIR)/bin/nginx-prometheus-exporter $(BUILDDIR)/bin/$(BINNAME)

override_dh_auto_install:
	dh_auto_install -- --no-source