File golang-github-docker-libnetwork.spec of Package golang-github-docker-libnetwork.6033

# spec file for package golang
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via
# nodebuginfo

# MANUAL: Update the git_version and git_revision
%define git_version 7b2b1feb1de4817d522cc372af149ff48d25028e
%define git_short   7b2b1feb1de4
# How to get the git_revision
# git clone libnetwork
# cd libnetwork
# git checkout $git_version
# git_revision=r$(git rev-list HEAD | wc -l)
%define git_revision r2066

%global provider        github
%global provider_tld    com
%global project         docker
%global repo            libnetwork
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
%global import_path     %{provider_prefix}

Name:           golang-%{provider}-%{project}-%{repo}
# FIX-UPSTREAM: It looks like Docker _downgraded_ their version of libnetwork
#               in the bump from v17.07.0_ce (0.7.0+gitr2322_4a242dba7739) to
#               v17.10.0_ce (0.7.0+gitr2066_7b2b1feb1de4). This means that we
#               have to fake the version here to be different from the upstream
#               version. Please keep this in mind next time you do an update.
Release:        0
Summary:        Docker Networking
License:        Apache-2.0
Group:          Development/Languages/Golang
Source0:        %{repo}-git.%{git_version}.tar.xz
Source1:        %{name}-rpmlintrc
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  fdupes
BuildRequires:  golang-packaging
BuildRequires:  xz
BuildRequires:  golang(API) = 1.8
ExcludeArch:    s390

Libnetwork provides a native Go implementation for connecting containers

The goal of libnetwork is to deliver a robust Container Network Model that
provides a consistent programming interface and the required network
abstractions for applications.

%package -n docker-libnetwork
Summary:        Docker Networking
Group:          System/Management
AutoReqProv:    Off
Conflicts:      docker < 17.09.0_ce
Provides:       fix_bsc_1057743
# We provide a git revision so that Docker can require it properly.
Provides:       docker-libnetwork-git = %{git_version}

%description -n docker-libnetwork
The docker-proxy binary used by Docker that provides Docker with libnetwork

%setup -q -n %{repo}-git.%{git_version}

%goprep %{import_path}
export CGO_ENABLED=0
%gobuild -buildmode=default cmd/proxy

mv %{buildroot}/%{_bindir}/proxy %{buildroot}/%{_bindir}/docker-proxy

%fdupes %{buildroot}/%{_prefix}

%files -f file.lst

%files -n docker-libnetwork

openSUSE Build Service is sponsored by