File: rules

package info (click to toggle)
gdu 5.25.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 624 kB
  • sloc: makefile: 122
file content (20 lines) | stat: -rwxr-xr-x 594 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/make -f

GOPKG = github.com/dundee/gdu/v5
VERSION ?= $(shell dpkg-parsechangelog -SVersion)

DH_GOLANG_BUILDPKG := github.com/dundee/gdu/v5/cmd/gdu
CGO_ENABLED := 0

GO_LDFLAGS += -X '$(GOPKG)/build.Version=$(VERSION)'
GO_LDFLAGS += -X '$(GOPKG)/build.User=debian'
GO_LDFLAGS += -X '$(GOPKG)/build.Time=$(shell TZ=Etc/UTC date +'%F_%T' -d @$(SOURCE_DATE_EPOCH))'

%:
	dh $@ --builddirectory=_build --buildsystem=golang --with=golang

override_dh_auto_install:
	dh_auto_install -- --no-source

override_dh_auto_build:
	dh_auto_build -O--buildsystem=golang -- -ldflags "$(GO_LDFLAGS)"