Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 include /usr/share/dpkg/pkg-info.mk
3
4 export DH_GOPKG := github.com/kumina/libvirt_exporter
5
6 BUILDDIR := $(CURDIR)/build
7
8 override_dh_auto_install:
9 dh_auto_install -- --no-source
10
11 %:
12 dh $@ --buildsystem=golang --with=golang \
13 --builddirectory=$(BUILDDIR)
14
15 BINNAME := $(DEB_SOURCE)
16 WHATIS := "$(BINNAME) \\- Prometheus exporter for libvirt metrics"
17
18 override_dh_auto_build:
19 dh_auto_build
20 # Rename the binary to match the debian package.
21 cp -v $(BUILDDIR)/bin/libvirt_exporter $(BUILDDIR)/bin/$(BINNAME)
22 rm -f $(BUILDDIR)/bin/libvirt_exporter
23 build/bin/$(BINNAME) --help-man > build/$(BINNAME).1
24 # Remove build user/build date/go version headers, which is ugly.
25 sed -i -e '/^ /d' build/$(BINNAME).1
26 # Fix whatis entry.
27 sed -i '/^.SH "NAME"/,+1c.SH "NAME"\n'$(WHATIS) build/$(BINNAME).1
28 sed -i "s/\.TH libvirt_exporter/\.TH $(BINNAME)/g" build/$(BINNAME).1
29 sed -i "s/\\\fBlibvirt_exporter/\\\fB$(BINNAME)/g" build/$(BINNAME).1
30
31 override_dh_auto_install: