加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
kubevirt.spec 3.14 KB
一键复制 编辑 原始数据 按行查看 历史
ocs-bot 提交于 2024-08-16 15:47 . Rebuilt for loongarch release
%global debug_package %{nil}
%ifarch aarch64
%global hostarch arm64
%endif
%ifarch x86_64
%global hostarch amd64
%endif
Summary: kubevirt - Container native virtualization
Name: kubevirt
Version: 0.59.0
Release: 6%{?dist}
License: BSD-3-Clause and ISC and Apache-2.0 and MIT
URL: https://github.com/kubevirt/kubevirt
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz
BuildRequires: libvirt-devel glibc-static rsync sed
BuildRequires: perl go
ExcludeArch: loongarch64
%description
KubeVirt is a virtual machine management add-on for Kubernetes. The aim is to provide a common
ground for virtualization solutions on top of Kubernetes.
%package virtctl
Summary: %{package_name} - virtctl
%description virtctl
CNV kubevirt virtctl
%package virtctl-redistributable
Summary: %{package_name} - virtctl-redistributable
%description virtctl-redistributable
KubeVirt is a virtual machine management add-on for Kubernetes. This package provides CNV kubevirt
virtctl executables for linux, MACos, Windows.
%prep
%autosetup
%build
mkdir -p go/src/kubevirt.io go/pkg
ln -s ../../../ go/src/kubevirt.io/kubevirt
export GOPATH=$(pwd)/go
cd ${GOPATH}/src/kubevirt.io/kubevirt
KUBEVIRT_GO_BASE_PKGDIR="${GOPATH}/pkg" KUBEVIRT_VERSION=%{kubevirt_version} KUBEVIRT_SOURCE_DATE_EPOCH="$(date +%s)" KUBEVIRT_GIT_VERSION=v%{kubevirt_version} KUBEVIRT_GIT_TREE_STATE="clean" GOFLAGS=-mod=vendor GO111MODULE=off ./hack/build-go.sh install cmd/virtctl
./hack/build-copy-artifacts.sh
%install
mkdir -p %{buildroot}%{_bindir}
chmod 0755 _out/cmd/virtctl/virtctl
install -p -m 0755 _out/cmd/virtctl/virtctl %{buildroot}%{_bindir}/
install -d -m 0755 %{buildroot}%{_datadir}/%{name}/linux
chmod 0755 _out/cmd/virtctl/virtctl-%{kubevirt_version}-linux-%{hostarch}
install -p -m 0755 _out/cmd/virtctl/virtctl-%{kubevirt_version}-linux-%{hostarch} %{buildroot}%{_datadir}/%{name}/linux/virtctl
%ifarch x86_64
install -d -m 0755 %{buildroot}%{_datadir}/%{name}/macosx
install -p -m 0755 _out/cmd/virtctl/virtctl-%{kubevirt_version}-darwin-amd64 %{buildroot}%{_datadir}/%{name}/macosx/virtctl
install -d -m 0755 %{buildroot}%{_datadir}/%{name}/windows
install -p -m 0755 _out/cmd/virtctl/virtctl-%{kubevirt_version}-windows-amd64.exe %{buildroot}%{_datadir}/%{name}/windows/virtctl.exe
%endif
%files virtctl
%{_bindir}/virtctl
%files virtctl-redistributable
%{_datadir}/%{name}/linux/
%ifarch x86_64
%{_datadir}/%{name}/macosx/
%{_datadir}/%{name}/windows/
%endif
%changelog
* Fri Aug 16 2024 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 0.59.0-6
- Rebuilt for loongarch release
* Thu Jul 25 2024 Pengda Dou <doupengda@loongson.cn> - 0.59.0-5
- [Type] other
- [DESC] add loongarch64 to ExcludeArch
* Fri Sep 08 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 0.59.0-4
- Rebuilt for OpenCloudOS Stream 23.09
* Wed Jul 19 2023 Miaojun Dong <zoedong@tencent.com> - 0.59.0-3
- Rebuild for libvirt-9.4.0
* Fri Apr 28 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 0.59.0-2
- Rebuilt for OpenCloudOS Stream 23.05
* Mon Apr 10 2023 Wang Guodong <gordonwwang@tencent.com> - 0.59.0-1
- initial build
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化