You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-libbpf-rs/rust-libbpf-rs.spec

106 lines
2.7 KiB

# Generated by rust2rpm 25
%bcond_without check
4 years ago
%global debug_package %{nil}
%global crate libbpf-rs
Name: rust-libbpf-rs
Version: 0.22.0
Release: %autorelease
4 years ago
Summary: Safe, idiomatic, and opinionated wrapper around libbpf-sys
License: LGPL-2.1-only OR BSD-2-Clause
4 years ago
URL: https://crates.io/crates/libbpf-rs
Source: %{crates_source}
# Manually created patch for downstream crate metadata changes
# * bump probe dependency to 0.5
# * only depend on probe on architectures that support inline assembly
Patch: libbpf-rs-fix-metadata.diff
# * restrict probe tests to architectures that support inline assembly
Patch: libbpf-rs-restrict-probe-arches.diff
4 years ago
BuildRequires: cargo-rpm-macros >= 24
4 years ago
%global _description %{expand:
Libbpf-rs is a safe, idiomatic, and opinionated wrapper around libbpf-
sys.}
4 years ago
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel %{_description}
This package contains library source intended for building other packages which
use the "%{crate}" crate.
4 years ago
%files devel
%license %{crate_instdir}/LICENSE
%license %{crate_instdir}/LICENSE.BSD-2-Clause
%license %{crate_instdir}/LICENSE.LGPL-2.1
%doc %{crate_instdir}/CHANGELOG.md
%doc %{crate_instdir}/README.md
%{crate_instdir}/
4 years ago
%package -n %{name}+default-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+default-devel %{_description}
This package contains library source intended for building other packages which
use the "default" feature of the "%{crate}" crate.
4 years ago
%files -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml
4 years ago
%package -n %{name}+novendor-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+novendor-devel %{_description}
This package contains library source intended for building other packages which
use the "novendor" feature of the "%{crate}" crate.
%files -n %{name}+novendor-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+static-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+static-devel %{_description}
This package contains library source intended for building other packages which
use the "static" feature of the "%{crate}" crate.
%files -n %{name}+static-devel
%ghost %{crate_instdir}/Cargo.toml
4 years ago
%prep
%autosetup -n %{crate}-%{version} -p1
4 years ago
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
# most of these tests fail, RLIMIT_MEMLOCK does not work in mock
rm tests/test.rs
rm tests/test_tc.rs
4 years ago
%cargo_test
%endif
%changelog
%autochangelog