Files
docker-cli/components/packaging/deb/common/rules
Eli Uriegas b3c9a88509 Do offline bundles for engine installs
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: fe03039776edbc90053b510ae6e72657340b1ccb
Component: packaging
2018-08-20 20:08:07 +00:00

42 lines
2.0 KiB
Makefile

#!/usr/bin/make -f
VERSION ?= $(shell cat engine/VERSION)
override_dh_gencontrol:
# if we're on Ubuntu, we need to Recommends: apparmor
echo 'apparmor:Recommends=$(shell dpkg-vendor --is Ubuntu && echo apparmor)' >> debian/docker-ce.substvars
dh_gencontrol
override_dh_auto_build:
cd /go/src/github.com/docker/cli && \
LDFLAGS='' DISABLE_WARN_OUTSIDE_CONTAINER=1 make VERSION=$(VERSION) GITCOMMIT=$(DOCKER_GITCOMMIT) dynbinary manpages
cd /go/src/github.com/crosbymichael/containerd-proxy && \
make SCOPE_LABEL="com.docker/containerd-proxy.scope" ANY_SCOPE="ee" bin/containerd-proxy
override_dh_strip:
# Go has lots of problems with stripping, so just don't
override_dh_auto_install:
# docker-ce-cli install
install -D -m 0644 /go/src/github.com/docker/cli/contrib/completion/fish/docker.fish debian/docker-ce-cli/usr/share/fish/vendor_completions.d/docker.fish
install -D -m 0644 /go/src/github.com/docker/cli/contrib/completion/zsh/_docker debian/docker-ce-cli/usr/share/zsh/vendor-completions/_docker
install -D -m 0755 /go/src/github.com/docker/cli/build/docker debian/docker-ce-cli/usr/bin/docker
# docker-ce install
install -D -m 0755 /go/src/github.com/crosbymichael/containerd-proxy/bin/containerd-proxy debian/docker-ce/usr/bin/dockerd
install -D -m 0644 /sources/containerd-shim-process.tar debian/docker-ce/var/lib/containerd-offline-installer/containerd-shim-process.tar
install -D -m 0644 /sources/engine.tar debian/docker-ce/var/lib/docker-engine/engine.tar
install -D -m 0644 /sources/docker.service debian/docker-ce/lib/systemd/system/docker.service
install -D -m 0644 /sources/dockerd.json debian/docker-ce/etc/containerd-proxy/dockerd.json
override_dh_install:
dh_install
# TODO Can we do this from within our container?
dh_apparmor --profile-name=docker-ce -pdocker-ce
override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
%:
dh $@ --with=bash-completion $(shell command -v dh_systemd_enable > /dev/null 2>&1 && echo --with=systemd)