File: rules

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

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

GOLDFLAGS ?= \
	-s -w \
	-X '$(DH_GOPKG)/build.Version=$(VERSION)' \
	-X '$(DH_GOPKG)/build.User=debian' \
	-X '$(DH_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 -- -ldflags "$(GOLDFLAGS)"