forked from docker/packaging
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrules
More file actions
executable file
·77 lines (61 loc) · 2.94 KB
/
rules
File metadata and controls
executable file
·77 lines (61 loc) · 2.94 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/usr/bin/make -f
# Copyright 2018-2022 Docker Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# 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
%:
dh $@
# GO_SRC_PATH and PKG_NAME are defined in the dockerfile
# VERSION and REF are defined in scripts/build-deb
# TODO remove custom PREFIX variable once containerd release/1.4 and release/1.5
# are obsolete. See https://github.com/containerd/containerd/commit/b5f530a157
binaries: ## Create containerd binaries
@set -x; GO111MODULE=auto make -C /go/src/github.com/containerd/containerd --no-print-directory \
DESTDIR="$$(pwd)" \
PREFIX="" \
VERSION=$${VERSION} \
REVISION=$${REVISION} \
PACKAGE=$${PKG_NAME} \
binaries install
# Remove containerd-stress, as we're not shipping it as part of the packages
rm -f bin/containerd-stress
bin/runc:
@set -x; GO111MODULE=auto make -C /go/src/github.com/opencontainers/runc --no-print-directory \
BINDIR="$$(pwd)/bin" \
runc install
man: ## Create containerd man pages
@set -x; GO111MODULE=auto make -C /go/src/github.com/containerd/containerd --no-print-directory man
# copy the generated man pages instead of using "make install-man" to allow
# dh_installman doing its magic
install -d man
install -D -p -m 0644 /go/src/github.com/containerd/containerd/man/* man
# 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
# 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_build: binaries bin/runc man
override_dh_systemd_start:
dh_systemd_start --restart-after-upgrade
sed -i 's/_dh_action=try-restart/_dh_action=restart/g' ./debian/containerd.io.postinst.debhelper
override_dh_auto_install: binaries bin/runc man
mkdir -p debian/containerd.io/usr/bin
install -D -p -m 0755 bin/* debian/containerd.io/usr/bin
install -D -p -m 0644 /common/containerd.service debian/containerd.io/lib/systemd/system/containerd.service
install -D -p -m 0644 /common/containerd.toml debian/containerd.io/etc/containerd/config.toml