2015-04-03 03:38:46 -04:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
|
|
|
VERSION = $(shell cat VERSION)
|
2016-06-30 16:33:21 -04:00
|
|
|
SYSTEMD_VERSION := $(shell dpkg-query -W -f='$${Version}\n' systemd | cut -d- -f1)
|
|
|
|
SYSTEMD_GT_227 := $(shell [ '$(SYSTEMD_VERSION)' ] && [ '$(SYSTEMD_VERSION)' -gt 227 ] && echo true )
|
2015-04-03 03:38:46 -04:00
|
|
|
|
|
|
|
override_dh_gencontrol:
|
|
|
|
# if we're on Ubuntu, we need to Recommends: apparmor
|
2015-05-05 12:11:59 -04:00
|
|
|
echo 'apparmor:Recommends=$(shell dpkg-vendor --is Ubuntu && echo apparmor)' >> debian/docker-engine.substvars
|
2015-04-03 03:38:46 -04:00
|
|
|
dh_gencontrol
|
|
|
|
|
|
|
|
override_dh_auto_build:
|
|
|
|
./hack/make.sh dynbinary
|
2015-06-08 13:48:20 -04:00
|
|
|
# ./man/md2man-all.sh runs outside the build container (if at all), since we don't have go-md2man here
|
2015-04-03 03:38:46 -04:00
|
|
|
|
|
|
|
override_dh_auto_test:
|
2016-02-19 17:42:51 -05:00
|
|
|
./bundles/$(VERSION)/dynbinary-daemon/dockerd -v
|
|
|
|
./bundles/$(VERSION)/dynbinary-client/docker -v
|
2015-04-03 03:38:46 -04:00
|
|
|
|
|
|
|
override_dh_strip:
|
2016-01-20 06:53:54 -05:00
|
|
|
# Go has lots of problems with stripping, so just don't
|
2015-04-03 03:38:46 -04:00
|
|
|
|
|
|
|
override_dh_auto_install:
|
2015-05-05 12:11:59 -04:00
|
|
|
mkdir -p debian/docker-engine/usr/bin
|
2016-02-19 17:42:51 -05:00
|
|
|
cp -aT "$$(readlink -f bundles/$(VERSION)/dynbinary-client/docker)" debian/docker-engine/usr/bin/docker
|
|
|
|
cp -aT "$$(readlink -f bundles/$(VERSION)/dynbinary-daemon/dockerd)" debian/docker-engine/usr/bin/dockerd
|
2016-06-03 12:28:14 -04:00
|
|
|
cp -aT "$$(readlink -f bundles/$(VERSION)/dynbinary-daemon/docker-proxy)" debian/docker-engine/usr/bin/docker-proxy
|
2016-03-21 20:37:31 -04:00
|
|
|
cp -aT /usr/local/bin/containerd debian/docker-engine/usr/bin/docker-containerd
|
|
|
|
cp -aT /usr/local/bin/containerd-shim debian/docker-engine/usr/bin/docker-containerd-shim
|
|
|
|
cp -aT /usr/local/bin/ctr debian/docker-engine/usr/bin/docker-containerd-ctr
|
2016-04-13 09:49:40 -04:00
|
|
|
cp -aT /usr/local/sbin/runc debian/docker-engine/usr/bin/docker-runc
|
2015-05-06 19:39:10 -04:00
|
|
|
mkdir -p debian/docker-engine/usr/lib/docker
|
2015-04-03 03:38:46 -04:00
|
|
|
|
|
|
|
override_dh_installinit:
|
2015-05-05 12:11:59 -04:00
|
|
|
# use "docker" as our service name, not "docker-engine"
|
2015-04-03 03:38:46 -04:00
|
|
|
dh_installinit --name=docker
|
2016-06-30 16:33:21 -04:00
|
|
|
ifeq (true, $(SYSTEMD_GT_227))
|
|
|
|
$(warning "Setting TasksMax=infinity")
|
|
|
|
sed -i -- 's/#TasksMax=infinity/TasksMax=infinity/' debian/docker-engine/lib/systemd/system/docker.service
|
|
|
|
endif
|
2015-04-03 03:38:46 -04:00
|
|
|
|
|
|
|
override_dh_installudev:
|
|
|
|
# match our existing priority
|
|
|
|
dh_installudev --priority=z80
|
|
|
|
|
2015-10-13 20:52:18 -04:00
|
|
|
override_dh_install:
|
|
|
|
dh_install
|
|
|
|
dh_apparmor --profile-name=docker-engine -pdocker-engine
|
|
|
|
|
2016-03-21 20:37:31 -04:00
|
|
|
override_dh_shlibdeps:
|
|
|
|
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
|
|
|
|
|
2015-04-03 03:38:46 -04:00
|
|
|
%:
|
2015-05-29 15:55:58 -04:00
|
|
|
dh $@ --with=bash-completion $(shell command -v dh_systemd_enable > /dev/null 2>&1 && echo --with=systemd)
|