forked from docker/packaging
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrules
More file actions
53 lines (41 loc) · 1.81 KB
/
rules
File metadata and controls
53 lines (41 loc) · 1.81 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/make -f
# Build Raspbian armhf binaries as ARMv6 with hard float.
include /usr/share/dpkg/vendor.mk
ifeq ($(DEB_VENDOR),Raspbian)
export CFLAGS += -marm -march=armv6+fp
export GOARM := 6
endif
# force packages to be built with xz compression, as Ubuntu 21.10 and up use
# zstd compression, which is non-standard, and breaks 'dpkg-sig --verify'
override_dh_builddeb:
dh_builddeb -- -Zxz
override_dh_auto_build:
cd $(CURDIR)/buildx && \
go build \
-mod=vendor \
-trimpath \
-ldflags "-w -X github.com/docker/buildx/version.Version=$(VERSION) -X github.com/docker/buildx/version.Revision=$(REVISION) -X github.com/docker/buildx/version.Package=github.com/docker/buildx" \
-o "/usr/libexec/docker/cli-plugins/docker-buildx" \
./cmd/buildx
override_dh_auto_test:
ver="$$(/usr/libexec/docker/cli-plugins/docker-buildx docker-cli-plugin-metadata | awk '{ gsub(/[",:]/,"")}; $$1 == "Version" { print $$2 }')"; \
test "$$ver" = "$(VERSION)" && echo "PASS: docker-buildx version OK" || (echo "FAIL: docker-buildx version ($$ver) did not match" && exit 1)
override_dh_strip:
# Go has lots of problems with stripping, so just don't
# http://manpages.debian.org/dh_dwz
override_dh_dwz:
# dh_dwz in debhelper versions less than 13 has issues with files that are missing debug symbols (once we update to debhelper-compat 13+ this can be removed)
@# https://packages.debian.org/debhelper
@# https://packages.ubuntu.com/debhelper
override_dh_auto_install:
install -D -p -m 0755 /usr/libexec/docker/cli-plugins/docker-buildx debian/docker-buildx-plugin/usr/libexec/docker/cli-plugins/docker-buildx
override_dh_installinit:
dh_installinit
override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
override_dh_install:
dh_install
override_dh_gencontrol:
dh_gencontrol --remaining-packages
%:
dh $@