File: rules

package info (click to toggle)
golang-github-micromdm-scep 2.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 436 kB
  • sloc: makefile: 47; sh: 27
file content (19 lines) | stat: -rwxr-xr-x 547 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

export CGO_ENABLED := 0
DH_GOPKG := github.com/micromdm/scep
include /usr/share/dpkg/pkg-info.mk
VERSION = $(shell echo $(DEB_VERSION) | cut -d- -f1)
LDFLAGS := -ldflags '-X "main.version=$(VERSION)"'

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

override_dh_auto_build:
	dh_auto_build -- $(LDFLAGS)

override_dh_install-indep:
	find debian/tmp/usr/share/gocode/src/$(DH_GOPKG)/scep/testdata/ \
	    -type f -exec chmod -x \{\} \;
	rm -rf debian/tmp/usr/share/gocode/src/$(DH_GOPKG)/cmd
	dh_install -i