]>
Commit | Line | Data |
---|---|---|
0aad696c JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without docs # Don't build man page (requires go arch) | |
4 | # | |
5 | %ifarch x32 | |
6 | %undefine with_docs | |
7 | %endif | |
b7b5a8d1 JP |
8 | Summary: OCI container runtime monitor |
9 | Name: conmon | |
58e11611 JP |
10 | Version: 2.1.10 |
11 | Release: 1 | |
b7b5a8d1 JP |
12 | License: Apache v2.0 |
13 | Group: Applications/System | |
14 | #Source0Download: https://github.com/containers/conmon/releases | |
15 | Source0: https://github.com/containers/conmon/archive/v%{version}/%{name}-%{version}.tar.gz | |
58e11611 | 16 | # Source0-md5: ecbec90ad0870e12de7adbb53416f383 |
b7b5a8d1 JP |
17 | URL: https://github.com/containers/conmon |
18 | BuildRequires: glib2-devel | |
0aad696c | 19 | %{?with_docs:BuildRequires: go-md2man} |
3054352d | 20 | BuildRequires: libseccomp-devel >= 2.5.2 |
b7b5a8d1 JP |
21 | BuildRequires: pkgconfig |
22 | BuildRequires: systemd-devel | |
3054352d | 23 | Requires: libseccomp >= 2.5.2 |
b7b5a8d1 JP |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
26 | %description | |
27 | Conmon is a monitoring program and communication tool between a | |
28 | container manager (like Podman or CRI-O) and an OCI runtime (like runc | |
29 | or crun) for a single container. | |
30 | ||
31 | %prep | |
32 | %setup -q | |
33 | ||
4e3ace04 JP |
34 | %{__rm} -r tools/vendor |
35 | ||
b7b5a8d1 | 36 | %build |
4e3ace04 JP |
37 | # prevent build of go-md2man |
38 | install -d tools/build | |
39 | : > tools/build/go-md2man | |
b7b5a8d1 JP |
40 | %{__make} \ |
41 | CC="%{__cc}" \ | |
42 | CFLAGS="%{rpmcppflags} %{rpmcflags}" \ | |
4e3ace04 JP |
43 | LDLAGS="%{rpmldflags}" \ |
44 | ||
0aad696c | 45 | %if %{with docs} |
4e3ace04 | 46 | %{__make} docs \ |
0aad696c JR |
47 | GOMD2MAN=/usr/bin/go-md2man |
48 | %endif | |
b7b5a8d1 JP |
49 | |
50 | %install | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | ||
0aad696c | 53 | %{__make} install.bin \ |
b7b5a8d1 | 54 | DESTDIR=$RPM_BUILD_ROOT \ |
0aad696c JR |
55 | PREFIX=%{_prefix} \ |
56 | BINDIR=%{_bindir} \ | |
57 | LIBEXECDIR=%{_libexecdir} | |
58 | ||
59 | %if %{with docs} | |
60 | %{__make} -C docs install \ | |
61 | DESTDIR=$RPM_BUILD_ROOT \ | |
62 | PREFIX=%{_prefix} \ | |
63 | BINDIR=%{_bindir} \ | |
64 | LIBEXECDIR=%{_libexecdir} | |
65 | %endif | |
b7b5a8d1 JP |
66 | |
67 | %clean | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %files | |
71 | %defattr(644,root,root,755) | |
72 | %doc README.md changelog.txt | |
73 | %attr(755,root,root) %{_bindir}/conmon | |
0aad696c | 74 | %{?with_docs:%{_mandir}/man8/conmon.8*} |