85 lines
2.0 KiB
RPMSpec
85 lines
2.0 KiB
RPMSpec
# Generated by go2rpm 1.15.0
|
|
%bcond check 1
|
|
%bcond bootstrap 0
|
|
|
|
%if %{with bootstrap}
|
|
%global debug_package %{nil}
|
|
%endif
|
|
|
|
%if %{with bootstrap}
|
|
%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$
|
|
%endif
|
|
|
|
# https://github.com/containernetworking/cni
|
|
%global goipath github.com/containernetworking/cni
|
|
Version: 0.8.1
|
|
%global tag v0.8.1
|
|
|
|
%gometa -L -f
|
|
|
|
%global common_description %{expand:
|
|
Container Network Interface - networking for Linux containers.}
|
|
|
|
%global golicenses LICENSE
|
|
%global godocs CODE-OF-CONDUCT.md CONTRIBUTING.md CONVENTIONS.md\\\
|
|
GOVERNANCE.md README.md RELEASING.md ROADMAP.md\\\
|
|
SPEC.md Documentation/cnitool.md Documentation/spec-\\\
|
|
upgrades.md cnitool/README.md
|
|
|
|
Name: golang-github-containernetworking-cni
|
|
Release: %autorelease
|
|
Summary: Container Network Interface - networking for Linux containers
|
|
|
|
License: Apache-2.0
|
|
URL: %{gourl}
|
|
Source: %{gosource}
|
|
Patch: 0001-Disable-test-with-missing-testdata.patch
|
|
|
|
%description %{common_description}
|
|
|
|
%gopkg
|
|
|
|
%prep
|
|
%goprep -A
|
|
%autopatch -p1 -q
|
|
|
|
%if %{without bootstrap}
|
|
%generate_buildrequires
|
|
%go_generate_buildrequires
|
|
%endif
|
|
|
|
%if %{without bootstrap}
|
|
%build
|
|
for cmd in cnitool; do
|
|
%gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
|
|
done
|
|
%endif
|
|
|
|
%install
|
|
%gopkginstall
|
|
%if %{without bootstrap}
|
|
install -m 0755 -vd %{buildroot}%{_bindir}
|
|
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
|
|
%endif
|
|
|
|
%if %{without bootstrap}
|
|
%if %{with check}
|
|
%check
|
|
%gocheck
|
|
%endif
|
|
%endif
|
|
|
|
%if %{without bootstrap}
|
|
%files
|
|
%license LICENSE
|
|
%doc CODE-OF-CONDUCT.md CONTRIBUTING.md CONVENTIONS.md GOVERNANCE.md README.md
|
|
%doc RELEASING.md ROADMAP.md SPEC.md Documentation/cnitool.md
|
|
%doc Documentation/spec-upgrades.md cnitool/README.md
|
|
%{_bindir}/*
|
|
%endif
|
|
|
|
%gopkgfiles
|
|
|
|
%changelog
|
|
%autochangelog
|