File: rules

package info (click to toggle)
amazon-ecr-credential-helper 0.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 368 kB
  • sloc: sh: 117; makefile: 101
file content (33 lines) | stat: -rwxr-xr-x 962 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/make -f

export DH_VERBOSE=1

export DH_OPTIONS

export DH_GOPKG := github.com/awslabs/amazon-ecr-credential-helper

VERSION := $(shell cat VERSION)
GITCOMMIT_SHA := $(shell cat GITCOMMIT_SHA)
package_root := "github.com/awslabs/amazon-ecr-credential-helper/ecr-login"

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

include /usr/share/dpkg/architecture.mk
override_dh_auto_build:
	dh_auto_build -- -ldflags "-X $(package_root)/version.Version=$(VERSION) -X $(package_root)/version.GitCommitSHA=$(GITCOMMIT_SHA)"
	mkdir -p bin/local
	cp obj-$(DEB_HOST_GNU_TYPE)/bin/docker-credential-ecr-login bin/local

override_dh_auto_install:
	dh_auto_install -- --no-source

override_dh_clean:
	dh_testdir -O--buildsystem=golang
	dh_auto_clean -O--buildsystem=golang
	dh_clean -O--buildsystem=golang
	rm -rf ./obj-*-linux-gnu
	rm -rf ./debian/amazon-ecr-credential-helper
	rm -rf ./debian/.debhelper
	rm -rf ./debian/files
	rm -f ./amazon-ecr-credential-helper_*