Files
docker-cli/components/packaging/deb/common/rules
Daniel Hiltgen d2ad7723be Address review comments on PR #128
Upstream-commit: 0cd6b38d6dbf77a661030303e5cfeb7b26f60d82
Component: packaging
2018-08-02 16:53:29 -07:00

32 lines
1.1 KiB
Makefile

#!/usr/bin/make -f
VERSION ?= $(shell cat engine/VERSION)
SYSTEMD_VERSION := $(shell dpkg-query -W -f='$${Version}\n' systemd libsystemd-dev | head -1 | cut -d- -f1)
SYSTEMD_GT_227 := $(shell [ '$(SYSTEMD_VERSION)' ] && [ '$(SYSTEMD_VERSION)' -gt 227 ] && echo true )
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='' make VERSION=$(VERSION) GITCOMMIT=$(DOCKER_GITCOMMIT) dynbinary manpages
override_dh_strip:
# Go has lots of problems with stripping, so just don't
override_dh_auto_install:
mkdir -p debian/docker-ce-cli/usr/bin
cp -aTL cli/build/docker debian/docker-ce-cli/usr/bin/docker
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)