github.com/rightscale/docker@v1.9.1/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/docker -v
    16  
    17  override_dh_strip:
    18  	# the SHA1 of dockerinit is important: don't strip it
    19  	# also, 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/docker)" debian/docker-engine/usr/bin/docker
    24  	mkdir -p debian/docker-engine/usr/lib/docker
    25  	cp -aT "$$(readlink -f bundles/$(VERSION)/dynbinary/dockerinit)" debian/docker-engine/usr/lib/docker/dockerinit
    26  
    27  override_dh_installinit:
    28  	# use "docker" as our service name, not "docker-engine"
    29  	dh_installinit --name=docker
    30  
    31  override_dh_installudev:
    32  	# match our existing priority
    33  	dh_installudev --priority=z80
    34  
    35  %:
    36  	dh $@ --with=bash-completion $(shell command -v dh_systemd_enable > /dev/null 2>&1 && echo --with=systemd)