# Template file for 'moby'
# should be kept in sync with docker-cli
pkgname=moby
version=29.7.2
revision=1
build_style=go
go_import_path="github.com/docker/docker"
hostmakedepends="go pkg-config go-md2man"
makedepends="libbtrfs-devel device-mapper-devel libnftables-devel libseccomp-devel"
depends="containerd iptables xz"
short_desc="Container engine for the Docker ecosystem"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
license="Apache-2.0"
homepage="https://www.docker.com"
changelog="https://github.com/moby/moby/releases"
distfiles="https://github.com/moby/moby/archive/docker-v${version}.tar.gz"
checksum=3a93a88bff41ffa6f4dca9f4ed9fc05e7fdb08e0f9014cf1d8177f85ecbc0683
system_groups="docker"
make_check=no # no other tests are available

do_build() {
	export AUTO_GOPATH=1
	export DOCKER_GITCOMMIT="tag v${version}"
	export DOCKER_BUILDTAGS="seccomp"
	export DISABLE_WARN_OUTSIDE_CONTAINER=1

	GOPATH="$PWD" VERSION="$version" hack/make.sh dynbinary
	go-md2man -in man/dockerd.8.md -out man/dockerd.8
}

do_install() {
	vbin bundles/dynbinary-daemon/dockerd
	vbin bundles/dynbinary-daemon/docker-proxy
	vsv docker
	vman man/dockerd.8
}
