-
Notifications
You must be signed in to change notification settings - Fork 127
/
Copy pathconmon.spec
78 lines (65 loc) · 1.4 KB
/
conmon.spec
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
%global with_debug 1
%if 0%{?with_debug}
%global _find_debuginfo_dwz_opts %{nil}
%global _dwz_low_mem_die_limit 0
%else
%global debug_package %{nil}
%endif
%if %{defined rhel}
%bcond_with docs
%else
%bcond_without docs
%endif
Name: conmon
%if %{defined rhel}
Epoch: 3
%else
Epoch: 2
%endif
Version: 2.1.12
License: Apache-2.0
Release: %autorelease
Summary: OCI container runtime monitor
URL: https://github.com/containers/%{name}
# Tarball fetched from upstream
Source0: %{url}/archive/v%{version}.tar.gz
%if %{with docs}
ExclusiveArch: %{golang_arches_future}
BuildRequires: go-md2man
%endif
BuildRequires: gcc
BuildRequires: git-core
BuildRequires: glib2-devel
BuildRequires: libseccomp-devel
BuildRequires: systemd-devel
BuildRequires: systemd-libs
BuildRequires: make
Requires: glib2
Requires: systemd-libs
Requires: libseccomp
%description
%{summary}.
%prep
%autosetup -Sgit %{name}-%{version}
sed -i 's/install.bin: bin\/conmon/install.bin:/' Makefile
%build
%{__make} DEBUGFLAG="-g" bin/conmon
%if %{with docs}
%{__make} GOMD2MAN=go-md2man -C docs
%endif
%install
%{__make} PREFIX=%{buildroot}%{_prefix} install.bin
%if %{with docs}
%{__make} PREFIX=%{buildroot}%{_prefix} -C docs install
%endif
#define license tag if not already defined
%{!?_licensedir:%global license %doc}
%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%if %{with docs}
%{_mandir}/man8/%{name}.8.gz
%endif
%changelog
%autochangelog