|
| 1 | +# Generated by go2rpm 1.16.0.post0 |
| 2 | +%bcond check 1 |
| 3 | + |
1 | 4 | # https://github.com/containers/podman-bootc |
2 | 5 | %global goipath github.com/containers/podman-bootc |
3 | | -Version: 0.1.1 |
| 6 | +Version: 0.1.2 |
4 | 7 |
|
5 | 8 | %gometa -L -f |
6 | 9 |
|
7 | | -%global golicenses LICENSE |
8 | | -%global godocs README.md |
| 10 | +%global common_description %{expand: |
| 11 | +A scriptable CLI that offers an efficient and ergonomic "edit-compile-debug" |
| 12 | +cycle for bootable containers.} |
9 | 13 |
|
10 | 14 | Name: podman-bootc |
11 | 15 | Release: %autorelease |
12 | 16 | Summary: Streamlining podman + bootc interactions |
13 | 17 |
|
14 | | -License: Apache-2.0 |
| 18 | +# Generated by go-vendor-tools |
| 19 | +License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unlicense |
15 | 20 | URL: %{gourl} |
16 | 21 | Source0: %{gosource} |
17 | | -Source1: vendor.tar.gz # Vendor file place holder |
18 | | - |
19 | | -BuildRequires: gcc |
20 | | -BuildRequires: golang |
21 | | -BuildRequires: make |
22 | | -BuildRequires: libvirt-devel |
| 22 | +# Generated by go-vendor-tools |
| 23 | +Source1: %{archivename}-vendor.tar.bz2 |
| 24 | +Source2: go-vendor-tools.toml |
23 | 25 |
|
24 | | -Requires: podman-machine |
25 | | -Requires: xorriso |
26 | | -Requires: podman |
27 | | -Requires: qemu |
28 | | -Requires: libvirt |
| 26 | +BuildRequires: go-vendor-tools |
| 27 | +# make needed for man generation but not available in release |
| 28 | +# BuildRequires: make |
| 29 | +BuildRequires: gcc |
| 30 | +BuildRequires: libvirt-devel |
| 31 | +BuildRequires: go-md2man |
29 | 32 |
|
30 | | -%description |
31 | | -%{summary}. |
| 33 | +Requires: podman-machine |
| 34 | +Requires: xorriso |
| 35 | +Requires: podman |
| 36 | +Requires: qemu |
| 37 | +Requires: libvirt |
32 | 38 |
|
33 | | -%gopkg |
| 39 | +%description %{common_description} |
34 | 40 |
|
35 | 41 | %prep |
36 | | -%goprep -Ak # k: keep vendor directory |
37 | | -%setup -T -D -a 1 |
| 42 | +%goprep -A |
| 43 | +%setup -q -T -D -a1 %{forgesetupargs} |
38 | 44 | %autopatch -p1 |
39 | 45 |
|
| 46 | +%generate_buildrequires |
| 47 | +%go_vendor_license_buildrequires -c %{S:2} |
| 48 | + |
40 | 49 | %build |
41 | | -export BUILDTAGS="exclude_graphdriver_btrfs btrfs_noversion exclude_graphdriver_devicemapper containers_image_openpgp remote" |
42 | | -%gobuild -o %{gobuilddir}/bin/%%{name} %{goipath} |
43 | | -%{__make} docs |
| 50 | +# explicitly turn on module support for gotest and gobuild |
| 51 | +%global gomodulesmode GO111MODULE=on |
| 52 | + |
| 53 | +# define global for use in gobuild and gotest |
| 54 | +%global buildtags exclude_graphdriver_btrfs btrfs_noversion exclude_graphdriver_devicemapper containers_image_openpgp remote |
| 55 | +export GO_BUILDTAGS="%{buildtags}" |
| 56 | + |
| 57 | +%gobuild -o %{gobuilddir}/bin/podman-bootc %{goipath} |
| 58 | + |
| 59 | +# docs directory not included in current source tar file |
| 60 | +# build man files |
| 61 | +# %%make_build docs |
44 | 62 |
|
45 | 63 | %install |
46 | | -%gopkginstall |
| 64 | +%go_vendor_license_install -c %{S:2} |
47 | 65 | install -m 0755 -vd %{buildroot}%{_bindir} |
48 | 66 | install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ |
49 | | -install -m 0755 -vd %{buildroot}%{_mandir}/man1 |
50 | | -install -m 0755 -vp docs/*.1 %{buildroot}%{_mandir}/man1/ |
| 67 | +# docs directory not included in current source tar file |
| 68 | +# install -m 0755 -vd %%{buildroot}%%{_mandir}/man1 |
| 69 | +# install -m 0755 -vp docs/*.1 %%{buildroot}%%{_mandir}/man1/ |
51 | 70 |
|
52 | | -%files |
53 | | -%license LICENSE |
54 | | -%doc README.md |
55 | | -%{_bindir}/* |
56 | | -%{_mandir}/man1/*.1* |
| 71 | +%check |
| 72 | +%go_vendor_license_check -c %{S:2} |
| 73 | + |
| 74 | +%if %{with check} |
| 75 | + |
| 76 | +# redefine gotestflags to include needed buildtags |
| 77 | +%define gotestflags %{gocompilerflags} '-tags=%{buildtags}' |
57 | 78 |
|
58 | | -%gopkgfiles |
| 79 | +# skip ./pkg/vms - cannot run vm tests in build |
| 80 | +# skip ./test - end-to-end integration tests that cannot run in build |
| 81 | +%gotest $(go list ./... | awk '!/(vm|test)/ {print $1}') |
| 82 | +%endif |
| 83 | + |
| 84 | +%files -f %{go_vendor_license_filelist} |
| 85 | +%license vendor/modules.txt |
| 86 | +%doc README.md |
| 87 | +%{_bindir}/podman-bootc |
| 88 | +# docs directory not included in current source tar file |
| 89 | +# %%{_mandir}/man1/*.1* |
59 | 90 |
|
60 | 91 | %changelog |
61 | 92 | %autochangelog |
0 commit comments