%if 0%{?fedora} || 0%{?rhel} == 6 %global with_debug 1 %global with_check 1 %else %global with_debug 0 %global with_check 0 %endif %if 0%{?with_debug} %global _dwz_low_mem_die_limit 0 %else %global debug_package %{nil} %endif %global provider github %global provider_tld com %global project estesp %global repo manifest-tool # https://github.com/estesp/manifest-tool %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} %global commit a28af2b6bf3748859149bf161eb0630e677c3906 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: manifest-tool Version: 0.6.0 Release: 3.git%{shortcommit}%{?dist} Summary: A command line tool used for creating manifest list objects License: ASL 2.0 URL: https://%{provider_prefix} Source: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz ExclusiveArch: x86_64 aarch64 ppc64le s390x # If go_compiler is not set to 1, there is no virtual provide. Use golang instead. BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} BuildRequires: git Provides: %{repo} = %{version}-%{release} Provides: bundled(golang(github.com/codegangsta/cli)) = v1.2.0 Provides: bundled(golang(github.com/Sirupsen/logrus)) = v0.8.7 Provides: bundled(golang(github.com/vbatts/tar-split)) = v0.10.1 Provides: bundled(golang(github.com/gorilla/mux)) Provides: bundled(golang(github.com/gorilla/context)) Provides: bundled(golang(golang.org/x/net)) Provides: bundled(golang(golang.org/x/time/rate)) Provides: bundled(golang(github.com/go-check/check)) = v1 Provides: bundled(golang(github.com/go-yaml/yaml)) = v2 Provides: bundled(golang(github.com/docker/docker)) = 7a855799175b6b984886ef1cfa337d6df1d4c668 Provides: bundled(golang(github.com/docker/distribution)) = 7dba427612198a11b161a27f9d40bb2dca1ccd20 Provides: bundled(golang(github.com/opencontainers/go-digest)) = a6d0ee40d4207ea02364bd3b9e8e77b9159ba1eb Provides: bundled(golang(github.com/docker/go-connections)) Provides: bundled(golang(github.com/docker/go-units)) Provides: bundled(golang(github.com/docker/libtrust)) Provides: bundled(golang(github.com/opencontainers/runc)) = 51371867a01c467f08af739783b8beafc15 Provides: bundled(golang(github.com/opencontainers/runtime-spec)) = 1c7c27d043c2a5e513a44084d2b10d77d1402b8c Provides: bundled(golang(github.com/pkg/errors)) Provides: bundled(golang(github.com/spf13/pflag)) Provides: bundled(golang(google.golang.org/grpc)) Provides: bundled(golang(github.com/golang/protobuf)) Provides: bundled(golang(github.com/golang/lint)) Provides: bundled(golang(github.com/Azure/go-ansiterm)) Provides: bundled(golang(github.com/Microsoft/go-winio)) Provides: bundled(golang(golang.org/x/sys/windows)) Provides: bundled(golang(github.com/mattn/go-shellwords)) %description This tool was mainly created for the purpose of viewing, creating, and pushing the new manifests list object type in the Docker registry. Manifest lists are defined in the v2.2 image specification and exist mainly for the purpose of supporting multi-architecture and/or multi-platform images within a Docker registry. %prep %autosetup -Sgit -n %{name}-%{commit} %build mkdir _build pushd _build mkdir -p src/%{provider}.%{provider_tld}/%{project} ln -s $(dirs +1 -l) src/%{import_path} popd export GOPATH=$(pwd)/_build:$(pwd):%{gopath} make binary %install export GOPATH=$(pwd)/_build:$(pwd):%{gopath} make DESTDIR=%{buildroot} install %files %license LICENSE %doc README.md %{_bindir}/%{name} %changelog * Mon Jul 10 2017 Josh Boyer 0.6.0-3.gita28af2b - Add bundled provides (rhbz 1467322) * Wed Jul 05 2017 Josh Boyer 0.6.0-2.gita28af2b - Cleanup with_bundled and license macro definitions (rhbz 1467322) * Sun Jul 02 2017 Josh Boyer 0.6.0-1.gita28af2b - Initial package for manifest-tool