lorbus / rpms / conmon-rs

Forked from rpms/conmon-rs 2 years ago
Clone

Blame SPECS/conmon-rs.spec

f4c158
# The following tag is to get correct syntax highlighting for this file in vim text editor
f4c158
# vim: syntax=spec
f4c158
f4c158
%global with_debug 0
f4c158
f4c158
%if 0%{?with_debug}
f4c158
%global _find_debuginfo_dwz_opts %{nil}
f4c158
%global _dwz_low_mem_die_limit 0
f4c158
%else
f4c158
%global debug_package %{nil}
f4c158
%endif
f4c158
f4c158
%global bin_name conmonrs
f4c158
f4c158
Name: conmon-rs
f4c158
Version: 0.5.1
f727f9
Release: 1%{?dist}
f4c158
Summary: Container monitor in Rust
f4c158
License: ASL 2.0 and BSD and ISC and MIT
f4c158
URL: https://github.com/containers/conmon-rs
a15c2c
Source0: https://github.com/containers/conmon-rs/releases/download/v%{version}/%{name}-%{version}.tar.gz
a15c2c
Source1: https://github.com/containers/conmon-rs/releases/download/v%{version}/conmonrs-v%{version}-vendor.tar.gz
f4c158
BuildRequires: capnproto
f4c158
BuildRequires: cargo
f4c158
BuildRequires: git-core
f4c158
BuildRequires: make
f4c158
BuildRequires: protobuf-compiler
a15c2c
%if 0%{?rhel}
a15c2c
BuildRequires:  rust-toolset
a15c2c
%else
a15c2c
BuildRequires:  rust-packaging
a15c2c
%endif
f4c158
Provides: %{bin_name}
f4c158
ExclusiveArch: %{rust_arches}
f4c158
f4c158
%description
f4c158
%{summary}.
f4c158
f4c158
%prep
a15c2c
%autosetup -n %{name}-%{version}
a15c2c
%if 0%{?rhel}
a15c2c
%cargo_prep -V 1
a15c2c
%else
a15c2c
%cargo_prep
a15c2c
%endif
a15c2c
a15c2c
%if !0%{?rhel}
a15c2c
%generate_buildrequires
a15c2c
%cargo_generate_buildrequires
a15c2c
%endif
f4c158
f4c158
%build
f4c158
%{__make} release
f4c158
f4c158
%install
f4c158
%{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install
f4c158
f4c158
%files
f4c158
%license LICENSE
f4c158
%{_bindir}/%{bin_name}
f4c158
f4c158
%changelog
f4c158
* Thu May 25 2023 Christian Glombek <cglombek@redhat.com> - 0.5.1-1
f4c158
- Initial Release