Blame conmon.spec

bad1c3c
%global with_debug 1
b38ade2
b38ade2
%if 0%{?with_debug}
b38ade2
%global _find_debuginfo_dwz_opts %{nil}
b38ade2
%global _dwz_low_mem_die_limit 0
b38ade2
%else
b38ade2
%global debug_package %{nil}
b38ade2
%endif
b38ade2
32fb4fc
%if 0%{?rhel}
32fb4fc
%bcond_with docs
32fb4fc
%else
32fb4fc
%bcond_without docs
32fb4fc
%endif
32fb4fc
becbe74
%global built_tag v2.1.5
3303aa2
%global built_tag_strip %(b=%{built_tag}; echo ${b:1})
07afe23
%global gen_version %(b=%{built_tag_strip}; echo ${b/-/"~"})
b38ade2
a163023
Name: conmon
b38ade2
Epoch: 2
3303aa2
Version: %{gen_version}
e9d68b4
License: ASL 2.0
58c1acf
Release: %autorelease
b38ade2
Summary: OCI container runtime monitor
e9d68b4
URL: https://github.com/containers/%{name}
07afe23
# Tarball fetched from upstream
07afe23
Source0: %{url}/archive/%{built_tag}.tar.gz
32fb4fc
%if %{with docs}
32fb4fc
ExclusiveArch: %{go_arches}
e9d68b4
BuildRequires: go-md2man
32fb4fc
%endif
e9d68b4
BuildRequires: gcc
e9d68b4
BuildRequires: git-core
b38ade2
BuildRequires: glib2-devel
10d89c6
BuildRequires: libseccomp-devel
0b0604a
BuildRequires: systemd-devel
0b0604a
BuildRequires: systemd-libs
3e19a2c
BuildRequires: make
8a9ef8f
Requires: glib2
0b0604a
Requires: systemd-libs
10d89c6
Requires: libseccomp
b38ade2
b38ade2
%description
b38ade2
%{summary}.
b38ade2
b38ade2
%prep
c1afe7d
%autosetup -Sgit %{name}-%{built_tag_strip}
cf03e2d
sed -i 's/install.bin: bin\/conmon/install.bin:/' Makefile
cf03e2d
sed -i 's/install.crio: bin\/conmon/install.crio:/' Makefile
b38ade2
b38ade2
%build
80bd2df
%{__make} DEBUGFLAG="-g" bin/conmon
32fb4fc
32fb4fc
%if %{with docs}
cf03e2d
%{__make} GOMD2MAN=go-md2man -C docs
32fb4fc
%endif
b38ade2
b38ade2
%install
cf03e2d
%{__make} PREFIX=%{buildroot}%{_prefix} install.bin install.crio
32fb4fc
32fb4fc
%if %{with docs}
cf03e2d
%{__make} PREFIX=%{buildroot}%{_prefix} -C docs install
32fb4fc
%endif
b38ade2
b38ade2
#define license tag if not already defined
b38ade2
%{!?_licensedir:%global license %doc}
b38ade2
b38ade2
%files
b38ade2
%license LICENSE
b38ade2
%doc README.md
b38ade2
%{_bindir}/%{name}
3128119
%{_libexecdir}/crio/%{name}
909404b
%dir %{_libexecdir}/crio
32fb4fc
32fb4fc
%if %{with docs}
dc93fcb
%{_mandir}/man8/%{name}.8.gz
32fb4fc
%endif
b38ade2
b38ade2
%changelog
58c1acf
%autochangelog