github.com/vincentwoo/docker@v0.7.3-0.20160116130405-82401a4b13c0/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  	# if we are building experimental we reccomend yubico-piv-tool
     9  	echo 'yubico:Recommends=$(shell [ "$DOCKER_EXPERIMENTAL" ] && echo "yubico-piv-tool (>= 1.1.0~)")' >> debian/docker-engine.substvars
    10  	dh_gencontrol
    11  
    12  override_dh_auto_build:
    13  	./hack/make.sh dynbinary
    14  	# ./man/md2man-all.sh runs outside the build container (if at all), since we don't have go-md2man here
    15  
    16  override_dh_auto_test:
    17  	./bundles/$(VERSION)/dynbinary/docker -v
    18  
    19  override_dh_strip:
    20  	# the SHA1 of dockerinit is important: don't strip it
    21  	# also, Go has lots of problems with stripping, so just don't
    22  
    23  override_dh_auto_install:
    24  	mkdir -p debian/docker-engine/usr/bin
    25  	cp -aT "$$(readlink -f bundles/$(VERSION)/dynbinary/docker)" debian/docker-engine/usr/bin/docker
    26  	mkdir -p debian/docker-engine/usr/lib/docker
    27  	cp -aT "$$(readlink -f bundles/$(VERSION)/dynbinary/dockerinit)" debian/docker-engine/usr/lib/docker/dockerinit
    28  
    29  override_dh_installinit:
    30  	# use "docker" as our service name, not "docker-engine"
    31  	dh_installinit --name=docker
    32  
    33  override_dh_installudev:
    34  	# match our existing priority
    35  	dh_installudev --priority=z80
    36  
    37  override_dh_install:
    38  	dh_install
    39  	dh_apparmor --profile-name=docker-engine -pdocker-engine
    40  
    41  %:
    42  	dh $@ --with=bash-completion $(shell command -v dh_systemd_enable > /dev/null 2>&1 && echo --with=systemd)