forked from machine-drivers/docker-machine-kvm
-
Notifications
You must be signed in to change notification settings - Fork 9
/
crc-driver-libvirt.spec.in
72 lines (50 loc) · 1.56 KB
/
crc-driver-libvirt.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# https://github.com/crc-org/machine-driver-libvirt
%global goipath github.com/crc-org/machine-driver-libvirt
%global goname crc-driver-libvirt
Version: __VERSION__
%gometa
%global gobuilddir %{_builddir}/%{archivename}/_build
# debuginfo is not supported with Go
%global debug_package %{nil}
%global _enable_debug_package 0
%global common_description %{expand:
CRC's libvirt machine driver}
%global golicenses LICENSE
%global godocs *.md
Name: %{goname}
Release: 2%{?dist}
Summary: CRC's libvirt machine driver
License: ASL 2.0
URL: %{gourl}
Source0: %{gosource}
BuildRequires: pkgconfig(libvirt)
BuildRequires: go-srpm-macros
BuildRequires: git-core
__BUNDLED_REQUIRES__
%description
%{common_description}
%gopkg
%prep
# with fedora macros: goprep -k
%autosetup -S git -n %{archivename}
install -m 0755 -vd "$(dirname %{gobuilddir}/src/%{goipath})"
ln -fs "$(pwd)" "%{gobuilddir}/src/%{goipath}"
%build
export GO111MODULE=off
export GOPATH=$(pwd)/_build:$(pwd)
%gobuild -o %{gobuilddir}/bin/crc-driver-libvirt %{goipath}/cmd/machine-driver-libvirt
%install
# with fedora macros: gopkginstall
install -m 0755 -vd %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
%check
# with fedora macros: gocheck
# This requires golangci-lint, so disabled for now
#go test ./...
%files
%license %{golicenses}
%doc
%{_bindir}/*
%changelog
* Wed Feb 03 2021 Christophe Fergeau <[email protected]> - 0.12.14-1
- Initial import in Fedora