|
|
|
@ -1,29 +1,19 @@
|
|
|
|
|
# Generated by rust2rpm 23
|
|
|
|
|
# Generated by rust2rpm 24
|
|
|
|
|
%bcond_without check
|
|
|
|
|
|
|
|
|
|
%global crate libbpf-cargo
|
|
|
|
|
|
|
|
|
|
# default to vendored libbpf
|
|
|
|
|
# otherwise we have to keep reasoning about if the system libbpf is new enough
|
|
|
|
|
%bcond_with novendor
|
|
|
|
|
|
|
|
|
|
Name: rust-libbpf-cargo
|
|
|
|
|
Version: 0.13.1
|
|
|
|
|
Version: 0.21.2
|
|
|
|
|
Release: %autorelease
|
|
|
|
|
Summary: Cargo plugin to build bpf programs
|
|
|
|
|
|
|
|
|
|
License: LGPL-2.1 OR BSD-2-Clause
|
|
|
|
|
License: LGPL-2.1-only OR BSD-2-Clause
|
|
|
|
|
URL: https://crates.io/crates/libbpf-cargo
|
|
|
|
|
Source: %{crates_source}
|
|
|
|
|
# Manually created patch for downstream crate metadata changes
|
|
|
|
|
# - bump cargo_metadata to 0.15
|
|
|
|
|
# - bump goblin to 0.5
|
|
|
|
|
Patch: libbpf-cargo-fix-metadata.diff
|
|
|
|
|
# by default, test.rs expects libbpf-rs to be in the same checkout
|
|
|
|
|
# fix to point to /usr/share/cargo/registry
|
|
|
|
|
Patch: libbpf-cargo-fix-finding-libbpf-rs.diff
|
|
|
|
|
# Conditional patch for defaulting to novendor
|
|
|
|
|
Patch101: libbpf-cargo-default-to-novendor.diff
|
|
|
|
|
|
|
|
|
|
BuildRequires: rust-packaging >= 21
|
|
|
|
|
|
|
|
|
@ -40,7 +30,8 @@ Summary: %{summary}
|
|
|
|
|
%files -n %{crate}
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%license LICENSE.BSD-2-Clause
|
|
|
|
|
%license LICENSE.LPGL-2.1
|
|
|
|
|
%license LICENSE.LGPL-2.1
|
|
|
|
|
%doc CHANGELOG.md
|
|
|
|
|
%doc README.md
|
|
|
|
|
%{_bindir}/cargo-libbpf
|
|
|
|
|
|
|
|
|
@ -58,7 +49,8 @@ use the "%{crate}" crate.
|
|
|
|
|
%files devel
|
|
|
|
|
%license %{crate_instdir}/LICENSE
|
|
|
|
|
%license %{crate_instdir}/LICENSE.BSD-2-Clause
|
|
|
|
|
%license %{crate_instdir}/LICENSE.LPGL-2.1
|
|
|
|
|
%license %{crate_instdir}/LICENSE.LGPL-2.1
|
|
|
|
|
%doc %{crate_instdir}/CHANGELOG.md
|
|
|
|
|
%doc %{crate_instdir}/README.md
|
|
|
|
|
%{crate_instdir}/
|
|
|
|
|
|
|
|
|
@ -74,7 +66,6 @@ use the "default" feature of the "%{crate}" crate.
|
|
|
|
|
%files -n %{name}+default-devel
|
|
|
|
|
%ghost %{crate_instdir}/Cargo.toml
|
|
|
|
|
|
|
|
|
|
%if %{with novendor}
|
|
|
|
|
%package -n %{name}+novendor-devel
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
@ -86,22 +77,14 @@ use the "novendor" feature of the "%{crate}" crate.
|
|
|
|
|
|
|
|
|
|
%files -n %{name}+novendor-devel
|
|
|
|
|
%ghost %{crate_instdir}/Cargo.toml
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n %{crate}-%{version_no_tilde} -N
|
|
|
|
|
%autopatch -p1 -M 100
|
|
|
|
|
%if %{with novendor}
|
|
|
|
|
%autopatch -p1 -m 101
|
|
|
|
|
%endif
|
|
|
|
|
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
|
|
|
|
%cargo_prep
|
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
|
|
|
|
%cargo_generate_buildrequires
|
|
|
|
|
echo 'clang'
|
|
|
|
|
# this was dropped from Cargo.toml upstream with the expectation that
|
|
|
|
|
# libbpf-rs is built from the same Git checkout
|
|
|
|
|
echo 'crate(libbpf-rs) = 0.19.1'
|
|
|
|
|
echo 'rustfmt'
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|