# Template file for 'docker-compose'
pkgname=docker-compose
version=5.3.1
revision=1
build_style=go
go_import_path="github.com/docker/compose/v5"
go_package="${go_import_path}/cmd"
go_ldflags="-X ${go_import_path}/internal.Version=v${version}"
depends="docker-cli"
short_desc="Tool to define and run multi-container Docker applications"
maintainer="Filip Rojek <filip@filiprojek.cz>"
license="Apache-2.0"
homepage="https://docs.docker.com/compose/"
changelog="https://github.com/docker/compose/releases"
distfiles="https://github.com/docker/compose/archive/refs/tags/v${version}.tar.gz"
checksum=1823e1b09c4082779fdf5cc9f3d8453b95dba3d939105b39366175ce12fdb6c7

post_install() {
	vmkdir usr/libexec/docker/cli-plugins
	mv ${DESTDIR}/usr/bin/cmd ${DESTDIR}/usr/libexec/docker/cli-plugins/docker-compose
	ln -s /usr/libexec/docker/cli-plugins/docker-compose ${DESTDIR}/usr/bin/docker-compose
}

do_check() {
	for d in $(go list ./... | grep -v '/pkg/e2e'); do
		go test "$d"
	done
}
