# Generated by rust2rpm 28 %bcond check 1 %global debug_package %{nil} %global crate rbpf Name: rust-rbpf Version: 0.4.1 Release: %autorelease Summary: Virtual machine and JIT compiler for eBPF programs # Upstream license specification: Apache-2.0/MIT License: Apache-2.0 OR MIT URL: https://crates.io/crates/rbpf Source: %{crates_source} BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Virtual machine and JIT compiler for eBPF programs.} %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. %files devel %license %{crate_instdir}/LICENSE-APACHE %license %{crate_instdir}/LICENSE-MIT %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}+cranelift-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+cranelift-devel %{_description} This package contains library source intended for building other packages which use the "cranelift" feature of the "%{crate}" crate. %files -n %{name}+cranelift-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+std-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+std-devel %{_description} This package contains library source intended for building other packages which use the "std" feature of the "%{crate}" crate. %files -n %{name}+std-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check # JIT tests (ubpf_jit_x86_64) and JIT doctests require mprotect(PROT_EXEC|PROT_WRITE) # which is denied by SELinux deny_execmem policy in mock/Koji. # Run lib unit tests + all safe integration tests, skip JIT and doctests. %cargo_test -- --lib --test ubpf_vm --test assembler --test disassembler --test misc --test ubpf_verifier %endif %changelog %autochangelog