File ovn-kubernetes.spec of Package ovn-kubernetes
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: ovn-kubernetes
Version: 1.0.0+git.0.56ddcd74a
Release: 0
License: Apache-2.0
Summary: Kubernetes networking platform
Url: https://github.com/ovn-kubernetes/ovn-kubernetes
Group: Development/Languages/Other
Source0: %{name}-%{version}.tar.xz
Source1: vendor.tar.xz
Patch1: build-go.patch
BuildRequires: golang-packaging
BuildRequires: ovn-central
Requires: /usr/bin/python3
Requires(post): %fillup_prereq
%{go_nostrip}
%{go_provides}
%description
OVN-Kubernetes (Open Virtual Networking - Kubernetes) is an open-source project
that provides a robust networking solution for Kubernetes clusters with OVN
(Open Virtual Networking) and Open vSwitch (Open Virtual Switch) at its core.
It is a Kubernetes networking conformant plugin written according to the CNI
(Container Network Interface) specifications.
%prep
%autosetup -a1 -p1
%build
export REV="%{version}"
export REV="${REV##*.}"
export GIT_COMMIT="$REV"
export GIT_BRANCH="HEAD"
pushd go-controller
cp /usr/share/ovn/ovn-nb.ovsschema pkg/nbdb
cp /usr/share/ovn/ovn-sb.ovsschema pkg/sbdb
hack/build-go.sh cmd/ovnkube cmd/ovn-k8s-cni-overlay cmd/ovn-kube-util hybrid-overlay/cmd/hybrid-overlay-node cmd/ovndbchecker cmd/ovnkube-trace cmd/ovnkube-identity
#hack/update-modelgen.sh
#hack/update-codegen.sh
popd
%install
pushd go-controller
export OUT_DIR="_output"
export BINDIR=%{buildroot}%{_bindir}
export CNIBINDIR=%{buildroot}%{_libexecdir}/cni/
mkdir -p $BINDIR
mkdir -p $CNIBINDIR
make install
# the following are missing from make install, but needed in container
install -D -m 755 ${OUT_DIR}/go/bin/hybrid-overlay-node ${BINDIR}/
install -D -m 755 ${OUT_DIR}/go/bin/ovnkube-identity ${BINDIR}/
#install -D -m 755 ${OUT_DIR}/go/bin/ovn-k8s-cni-overlay -t ${CNIBINDIR}/
#install -D -m 755 ${OUT_DIR}/go/bin/ovndbchecker ${BINDIR}/
popd
%files
%doc README.md
%doc dist/images/ovnkube.sh
%doc dist/images/ovndb-raft-functions.sh
%license LICENSE
%{_bindir}
%dir %{_libexecdir}
%{_libexecdir}/cni
%changelog