1%global debug_package %{nil} 2 3Name: docker-ce-cli 4Version: %{_version} 5Release: %{_release}%{?dist} 6Epoch: 1 7Summary: The open-source application container engine 8Group: Tools/Docker 9License: ASL 2.0 10Source0: cli.tgz 11URL: https://www.docker.com 12Vendor: Docker 13Packager: Docker <support@docker.com> 14 15# required packages on install 16Requires: /bin/sh 17 18BuildRequires: make 19BuildRequires: libtool-ltdl-devel 20 21# conflicting packages 22Conflicts: docker 23Conflicts: docker-io 24Conflicts: docker-engine-cs 25Conflicts: docker-ee 26Conflicts: docker-ee-cli 27 28%description 29Docker is is a product for you to build, ship and run any application as a 30lightweight container. 31 32Docker containers are both hardware-agnostic and platform-agnostic. This means 33they can run anywhere, from your laptop to the largest cloud compute instance and 34everything in between - and they don't require you to use a particular 35language, framework or packaging system. That makes them great building blocks 36for deploying and scaling web apps, databases, and backend services without 37depending on a particular stack or provider. 38 39%prep 40%setup -q -c -n src 41 42%build 43mkdir -p /go/src/github.com/docker 44rm -f /go/src/github.com/docker/cli 45ln -s /root/rpmbuild/BUILD/src/cli /go/src/github.com/docker/cli 46pushd /go/src/github.com/docker/cli 47DISABLE_WARN_OUTSIDE_CONTAINER=1 make VERSION=%{_origversion} GITCOMMIT=%{_gitcommit} dynbinary manpages # cli 48popd 49 50# %check 51# cli/build/docker -v 52 53%install 54# install binary 55install -d $RPM_BUILD_ROOT/%{_bindir} 56install -p -m 755 cli/build/docker $RPM_BUILD_ROOT/%{_bindir}/docker 57 58# add bash, zsh, and fish completions 59install -d $RPM_BUILD_ROOT/usr/share/bash-completion/completions 60install -d $RPM_BUILD_ROOT/usr/share/zsh/vendor-completions 61install -d $RPM_BUILD_ROOT/usr/share/fish/vendor_completions.d 62install -p -m 644 cli/contrib/completion/bash/docker $RPM_BUILD_ROOT/usr/share/bash-completion/completions/docker 63install -p -m 644 cli/contrib/completion/zsh/_docker $RPM_BUILD_ROOT/usr/share/zsh/vendor-completions/_docker 64install -p -m 644 cli/contrib/completion/fish/docker.fish $RPM_BUILD_ROOT/usr/share/fish/vendor_completions.d/docker.fish 65 66# install manpages 67install -d %{buildroot}%{_mandir}/man1 68install -p -m 644 cli/man/man1/*.1 $RPM_BUILD_ROOT/%{_mandir}/man1 69install -d %{buildroot}%{_mandir}/man5 70install -p -m 644 cli/man/man5/*.5 $RPM_BUILD_ROOT/%{_mandir}/man5 71install -d %{buildroot}%{_mandir}/man8 72install -p -m 644 cli/man/man8/*.8 $RPM_BUILD_ROOT/%{_mandir}/man8 73 74mkdir -p build-docs 75for cli_file in LICENSE MAINTAINERS NOTICE README.md; do 76 cp "cli/$cli_file" "build-docs/$cli_file" 77done 78 79# list files owned by the package here 80%files 81%doc build-docs/LICENSE build-docs/MAINTAINERS build-docs/NOTICE build-docs/README.md 82/%{_bindir}/docker 83/usr/share/bash-completion/completions/docker 84/usr/share/zsh/vendor-completions/_docker 85/usr/share/fish/vendor_completions.d/docker.fish 86%doc 87/%{_mandir}/man1/* 88/%{_mandir}/man5/* 89/%{_mandir}/man8/* 90 91 92%post 93if ! getent group docker > /dev/null; then 94 groupadd --system docker 95fi 96 97%changelog 98