This commit is contained in:
Sergey Zhemoytel 2024-05-18 22:26:27 +00:00
parent 41ca63ccbd
commit dca22948f1
2 changed files with 22 additions and 13 deletions

View file

@ -1,4 +1,4 @@
sources:
compose-1.29.1.tar.gz: 14f4c5134fabd56c44ac0ca91bc39ace902a7fc9
compose-2.27.0.tar.gz: 2ec214558ee8b3c9b76677368a7e64e9a5806a72
docker-compose-%{verson}.tar.gz: 191fdd50b8a89f97fd9958f08068b3d3e00246b6
docker-compose-2.27.0.tar.gz: 2ec214558ee8b3c9b76677368a7e64e9a5806a72

View file

@ -1,14 +1,18 @@
%define debug %nil
%define debug_package %nil
%define debug %nil
%define debug_package %nil
%define oname docker-compose
%define plugin compose
Name: %{oname}
%define _libexec /usr/libexec
%define _dockerpluginsdir %{_libexec}/docker/cli-plugins
Name: docker-%{plugin}
Version: 2.27.0
Release: 1
Release: 2
Summary: Docker compose golang version
URL: https://docs.docker.com/compose
Source0: https://github.com/docker/compose/archive/v%{version}/%{name}-%{version}.tar.gz
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
@ -29,19 +33,24 @@ create and start your application with a single command:
docker compose up
%prep
%setup -qn compose-%{version}
%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/%{oname} ./cmd
upx bin/%{oname}
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/%{oname} %{buildroot}%{_bindir}/%{oname}
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}/%{oname}
%{_bindir}/%{name}
%{_dockerpluginsdir}/%{name}