github.com/sijibomii/docker@v0.0.0-20231230191044-5cf6ca554647/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  	# Go has lots of problems with stripping, so just don't
    19  
    20  override_dh_auto_install:
    21  	mkdir -p debian/docker-engine/usr/bin
    22  	cp -aT "$$(readlink -f bundles/$(VERSION)/dynbinary/docker)" debian/docker-engine/usr/bin/docker
    23  	cp -aT /usr/local/bin/containerd debian/docker-engine/usr/bin/docker-containerd
    24  	cp -aT /usr/local/bin/containerd-shim debian/docker-engine/usr/bin/docker-containerd-shim
    25  	cp -aT /usr/local/bin/ctr debian/docker-engine/usr/bin/docker-containerd-ctr
    26  	cp -aT /usr/local/bin/runc debian/docker-engine/usr/bin/docker-runc
    27  	mkdir -p debian/docker-engine/usr/lib/docker
    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  override_dh_shlibdeps:
    42  	dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
    43  
    44  %:
    45  	dh $@ --with=bash-completion $(shell command -v dh_systemd_enable > /dev/null 2>&1 && echo --with=systemd)