-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcrc-admin-helper.spec.in
113 lines (84 loc) · 3.28 KB
/
crc-admin-helper.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# https://github.com/crc-org/admin-helper
%global goipath github.com/crc-org/admin-helper
%global goname crc-admin-helper
Version: 0.5.5
%global golang_arches x86_64 aarch64
%gometa
%global gobuilddir %{_builddir}/%{archivename}/_build
# debuginfo is not supported on RHEL with Go packages
%global debug_package %{nil}
%global _enable_debug_package 0
%global common_description %{expand:
CRC's helper with administrative privileges}
%global golicenses LICENSE
%global godocs *.md
%ifarch x86_64
%global gohostarch amd64
%endif
%ifarch aarch64
%global gohostarch arm64
%endif
Name: %{goname}
Release: 1%{?dist}
Summary: CRC's helper with administrative privileges
License: MIT
URL: %{gourl}
Source0: %{gosource}
#generate_buildrequires
#go_generate_buildrequires
BuildRequires: git-core
BuildRequires: go-srpm-macros
BuildRequires: make
__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 GOFLAGS="-mod=vendor"
make VERSION=%{version} GO_LDFLAGS="-B gobuildid" GO_BUILDFLAGS="-a -v -x" release
%install
# with fedora macros: gopkginstall
install -m 0755 -vd %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/src/%{goipath}/out/linux-%{gohostarch}/crc-admin-helper %{buildroot}%{_bindir}/
install -d %{buildroot}%{_datadir}/%{name}-redistributable/{linux,macos,windows}
install -m 0755 -vp %{gobuilddir}/src/%{goipath}/out/linux-amd64/crc-admin-helper %{buildroot}%{_datadir}/%{name}-redistributable/linux/%{name}-amd64
install -m 0755 -vp %{gobuilddir}/src/%{goipath}/out/linux-arm64/crc-admin-helper %{buildroot}%{_datadir}/%{name}-redistributable/linux/%{name}-arm64
install -m 0755 -vp %{gobuilddir}/src/%{goipath}/out/windows-amd64/crc-admin-helper.exe %{buildroot}%{_datadir}/%{name}-redistributable/windows/
install -m 0755 -vp %{gobuilddir}/src/%{goipath}/out/macos-universal/crc-admin-helper %{buildroot}%{_datadir}/%{name}-redistributable/macos/
%check
# with fedora macros: gocheck
export GOFLAGS="-mod=vendor"
go test ./...
%files
%license %{golicenses}
%doc
%{_bindir}/*
%{_datadir}/%{name}-redistributable/linux/*
%{_datadir}/%{name}-redistributable/macos/*
%{_datadir}/%{name}-redistributable/windows/*
#gopkgfiles
%changelog
* Thu Jun 20 2024 Anjan Nath <[email protected]>
- update to admin-helper 0.5.4
* Wed Jun 19 2024 Anjan Nath <[email protected]>
- update to admin-helper 0.5.3
* Fri Dec 20 2023 Anjan Nath <[email protected]> - 0.5.2-1
- update to admin-helper 0.5.2
* Fri Dec 15 2023 Anjan Nath <[email protected]> - 0.5.1-1
- update to admin-helper 0.5.1
* Wed Dec 01 2023 Christophe Fergeau <[email protected]> - 0.5.0-1
- Update to admin-helper 0.5.0
* Mon Dec 12 2022 Christophe Fergeau <[email protected]> - 0.0.12-1
- Update to admin-helper 0.0.12
* Tue May 31 2022 Anjan Nath <[email protected]> - 0.0.11-1
- Update to admin-helper 0.0.11
- install macOS arm64 builds
* Mon Jan 31 2022 Christophe Fergeau <[email protected]> - 0.0.9-1
- Update to admin-helper 0.0.9
* Wed Feb 03 2021 Christophe Fergeau <[email protected]> - 0.0.2-1
- Initial import in Fedora