docker-compose/docker-compose.spec
Your Name 1ee6743ae3
All checks were successful
Run CI/CD... / main (push) Successful in 7m31s
2.33.1
2025-02-21 20:46:51 +00:00

57 lines
1.5 KiB
RPMSpec

%define debug %nil
%define debug_package %nil
%define plugin compose
%define _libexec /usr/libexec
%define _dockerpluginsdir %{_libexec}/docker/cli-plugins
Name: docker-%{plugin}
Version: 2.33.1
Release: 1
Summary: Docker compose golang version
URL: https://docs.docker.com/%{plugin}
Source0: https://github.com/docker/%{plugin}/archive/v%{version}/%{plugin}-%{version}.tar.gz
Group: Development/Other
License: ASL 2.0
BuildRequires: go >= 1.21
BuildRequires: git-core
BuildRequires: upx
BuildRequires: pkgconfig(openssl3.3)
Requires: docker
%description
Docker Compose v2
Docker Compose is a tool for running multi-container
applications on Docker defined using the Compose file
format. A Compose file is used to define how the one or
more containers that make up your application are
configured. Once you have a Compose file, you can
create and start your application with a single command:
docker compose up
%prep
%setup -qn %{plugin}-%{version}
%build
export GOPROXY=https://proxy.golang.org/cached-only
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -X github.com/docker/compose/v2/internal.Version=%{version}" -o bin/%{name} ./cmd
upx bin/%{name}
find . -type f -size 0 -exec rm -f {} \;
%install
install -Dm0755 bin/%{name} %{buildroot}%{_bindir}/%{name}
install -d %{buildroot}%{_dockerpluginsdir}
ln -s ../../../bin/%{name} %{buildroot}%{_dockerpluginsdir}/%{name}
%files
%doc README.md LICENSE docs
%{_bindir}/%{name}
%{_dockerpluginsdir}/%{name}