github.com/noxiouz/docker@v0.7.3-0.20160629055221-3d231c78e8c5/hack/make/.build-deb/rules (about)

     1  #!/usr/bin/make -f
     2  
     3  VERSION = $(shell cat VERSION)
     4  
     5  override_dh_gencontrol:
     6  	# if we're on Ubuntu, we need to Recommends: apparmor
     7  	echo 'apparmor:Recommends=$(shell dpkg-vendor --is Ubuntu && echo apparmor)' >> debian/docker-engine.substvars
     8  	dh_gencontrol
     9  
    10  override_dh_auto_build:
    11  	./hack/make.sh dynbinary
    12  	# ./man/md2man-all.sh runs outside the build container (if at all), since we don't have go-md2man here
    13  
    14  override_dh_auto_test:
    15  	./bundles/$(VERSION)/dynbinary-daemon/dockerd -v
    16  	./bundles/$(VERSION)/dynbinary-client/docker -v
    17  
    18  override_dh_strip:
    19  	# Go has lots of problems with stripping, so just don't
    20  
    21  override_dh_auto_install:
    22  	mkdir -p debian/docker-engine/usr/bin
    23  	cp -aT "$$(readlink -f bundles/$(VERSION)/dynbinary-client/docker)" debian/docker-engine/usr/bin/docker
    24  	cp -aT "$$(readlink -f bundles/$(VERSION)/dynbinary-daemon/dockerd)" debian/docker-engine/usr/bin/dockerd
    25  	cp -aT /usr/local/bin/containerd debian/docker-engine/usr/bin/docker-containerd
    26  	cp -aT /usr/local/bin/containerd-shim debian/docker-engine/usr/bin/docker-containerd-shim
    27  	cp -aT /usr/local/bin/ctr debian/docker-engine/usr/bin/docker-containerd-ctr
    28  	cp -aT /usr/local/sbin/runc debian/docker-engine/usr/bin/docker-runc
    29  	mkdir -p debian/docker-engine/usr/lib/docker
    30  
    31  override_dh_installinit:
    32  	# use "docker" as our service name, not "docker-engine"
    33  	dh_installinit --name=docker
    34  
    35  override_dh_installudev:
    36  	# match our existing priority
    37  	dh_installudev --priority=z80
    38  
    39  override_dh_install:
    40  	dh_install
    41  	dh_apparmor --profile-name=docker-engine -pdocker-engine
    42  
    43  override_dh_shlibdeps:
    44  	dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
    45  
    46  %:
    47  	dh $@ --with=bash-completion $(shell command -v dh_systemd_enable > /dev/null 2>&1 && echo --with=systemd)