# https://github.com/code-ready/machine-driver-libvirt %global goipath github.com/code-ready/machine-driver-libvirt Version: 0.12.14 %gometa %global gobuilddir %{_builddir}/%{name}-%{version}/_build # debuginfo is not supported with Go %global debug_package %{nil} %global _enable_debug_package 0 %global common_description %{expand: CodeReady Container's libvirt machine driver} %global golicenses LICENSE %global godocs *.md Name: %{goname} Release: 2%{?dist} Summary: CodeReady Container's libvirt machine driver License: ASL 2.0 URL: %{gourl} Source0: %{gosource} #Patch0001: 0001-Fix-compilation-with-newer-libvirt-go.patch #generate_buildrequires #go_generate_buildrequires #BuildRequires: golang-ipath(github.com/code-ready/machine) #BuildRequires: golang(github.com/libvirt/libvirt-go) #BuildRequires: golang(github.com/libvirt/libvirt-go-xml) #BuildRequires: golang(github.com/sirupsen/logrus) #BuildRequires: golang(github.com/stretchr/testify) BuildRequires: pkgconfig(libvirt) BuildRequires: go-srpm-macros BuildRequires: git-core #BuildRequires: go-compilers-golang-compiler %description %{common_description} %gopkg %prep #goprep -k #patch0001 -p1 %autosetup -S git -n %{archivename} install -m 0755 -vd "$(dirname %{gobuilddir}/src/%{goipath})" ln -fs "$(pwd)" "%{gobuilddir}/src/%{goipath}" %build export GOPATH=%{gobuilddir}:%{gopath} export GO111MODULE=off %gobuild -o %{gobuilddir}/bin/crc-driver-libvirt %{goipath}/cmd/machine-driver-libvirt %install #gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ #check #gocheck #go test ./... %files %license %{golicenses} %doc %{_bindir}/* #gopkgfiles %changelog * Wed Feb 03 2021 Christophe Fergeau - 0.12.14-1 - Initial import in Fedora