2018-02-01 21:28:24 +01:00
|
|
|
#
|
|
|
|
# spec file for package cni-plugins
|
|
|
|
#
|
2019-02-02 21:43:20 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2018-02-01 21:28:24 +01:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-02-02 21:43:20 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-02-01 21:28:24 +01:00
|
|
|
#
|
|
|
|
|
2018-06-05 12:52:50 +02:00
|
|
|
|
2018-02-01 21:28:24 +01:00
|
|
|
%define cni_bin_dir %{_libexecdir}/cni
|
|
|
|
%define cni_doc_dir %{_docdir}/cni-plugins
|
|
|
|
|
|
|
|
Name: cni-plugins
|
2019-08-19 20:47:13 +02:00
|
|
|
Version: 0.8.2
|
2018-02-01 21:28:24 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Container Network Interface plugins
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: System/Management
|
|
|
|
Url: https://github.com/containernetworking/plugins
|
|
|
|
Source: %{name}-%{version}.tar.xz
|
2018-12-13 19:49:21 +01:00
|
|
|
BuildRequires: go >= 1.11
|
|
|
|
BuildRequires: golang-packaging
|
2018-02-01 21:28:24 +01:00
|
|
|
BuildRequires: golang-packaging
|
|
|
|
BuildRequires: shadow
|
|
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
BuildRequires: xz
|
2018-12-13 19:49:21 +01:00
|
|
|
BuildRequires: golang(API) >= 1.11
|
2018-02-01 21:28:24 +01:00
|
|
|
Requires: cni
|
|
|
|
Requires(post): %fillup_prereq
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%{?systemd_requires}
|
|
|
|
# Make sure that the binary is not getting stripped.
|
|
|
|
%{go_nostrip}
|
|
|
|
|
|
|
|
%description
|
|
|
|
The CNI (Container Network Interface) project consists of a
|
|
|
|
specification and libraries for writing plugins to configure
|
|
|
|
network interfaces in Linux containers, along with a number of
|
|
|
|
supported plugins. CNI concerns itself only with network
|
|
|
|
connectivity of containers and removing allocated resources when
|
|
|
|
the container is deleted. Because of this focus, CNI has a wide
|
|
|
|
range of support and the specification is simple to implement.
|
|
|
|
|
|
|
|
These are the additional CNI network plugins provided by
|
|
|
|
the containernetworking team.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
2019-06-07 12:17:30 +02:00
|
|
|
./build_linux.sh
|
2018-02-01 21:28:24 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
|
|
|
|
# install the plugins
|
|
|
|
install -m 755 -d "%{buildroot}%{cni_bin_dir}"
|
|
|
|
cp bin/* "%{buildroot}%{cni_bin_dir}/"
|
|
|
|
|
|
|
|
# documentation
|
|
|
|
install -m 755 -d "%{buildroot}%{cni_doc_dir}"
|
|
|
|
|
|
|
|
# TODO: copy the READMEs
|
|
|
|
#for i in plugins/main/*/README.md ; do
|
2018-06-05 12:52:50 +02:00
|
|
|
# cp Documentation/* %{buildroot}%{cni_doc_dir}/plugins/
|
2018-02-01 21:28:24 +01:00
|
|
|
#done
|
|
|
|
|
|
|
|
%post
|
|
|
|
%{fillup_only -n %{name}}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{cni_doc_dir}
|
2018-06-05 12:52:50 +02:00
|
|
|
%doc CONTRIBUTING.md
|
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
|
|
|
%dir %{cni_bin_dir}
|
2018-02-01 21:28:24 +01:00
|
|
|
%{cni_bin_dir}/*
|
|
|
|
# %{cni_doc_dir}/plugins/*
|
|
|
|
|
|
|
|
%changelog
|