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.
94 lines
2.2 KiB
94 lines
2.2 KiB
# Generated by rust2rpm 25
|
|
%bcond_without check
|
|
%global debug_package %{nil}
|
|
|
|
%global crate libbpf-cargo
|
|
|
|
Name: rust-libbpf-cargo0.21
|
|
Version: 0.21.2
|
|
Release: %autorelease
|
|
Summary: Cargo plugin to build bpf programs
|
|
|
|
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
|
|
# * disable bin - compat crate
|
|
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
|
|
|
|
BuildRequires: cargo-rpm-macros >= 24
|
|
|
|
%global _description %{expand:
|
|
Cargo plugin to build bpf programs.}
|
|
|
|
%description %{_description}
|
|
|
|
%package devel
|
|
Summary: %{summary}
|
|
BuildArch: noarch
|
|
Requires: clang
|
|
Requires: rustfmt
|
|
|
|
%description devel %{_description}
|
|
|
|
This package contains library source intended for building other packages which
|
|
use the "%{crate}" crate.
|
|
|
|
%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}/
|
|
|
|
%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.
|
|
|
|
%files -n %{name}+default-devel
|
|
%ghost %{crate_instdir}/Cargo.toml
|
|
|
|
%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
|
|
|
|
%prep
|
|
%autosetup -n %{crate}-%{version} -p1
|
|
%cargo_prep
|
|
|
|
%generate_buildrequires
|
|
%cargo_generate_buildrequires
|
|
echo 'clang'
|
|
echo 'rustfmt'
|
|
|
|
%build
|
|
%cargo_build
|
|
|
|
%install
|
|
%cargo_install
|
|
|
|
%if %{with check}
|
|
%check
|
|
%cargo_test
|
|
%endif
|
|
|
|
%changelog
|
|
%autochangelog
|