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-sys/rust-libbpf-sys.spec

99 lines
2.3 KiB

# Generated by rust2rpm 18
4 years ago
%bcond_without check
%global debug_package %{nil}
%global crate libbpf-sys
Name: rust-%{crate}
Version: 0.5.0~1
Release: %autorelease
4 years ago
Summary: Rust bindings to libbpf from the Linux kernel
# Upstream license specification: BSD-2-Clause
License: BSD
URL: https://crates.io/crates/libbpf-sys
Source: %{crates_source}
# Turn on the novendor feature by default
Patch0: libbpf-sys-fix-metadata.diff
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
BuildArch: noarch
%endif
BuildRequires: rust-packaging
BuildRequires: kernel-headers
BuildRequires: elfutils-libelf-devel
BuildRequires: libbpf-devel
BuildRequires: zlib-devel
%global _description %{expand:
Rust bindings to libbpf from the Linux kernel.}
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
Requires: kernel-headers
Requires: elfutils-libelf-devel
Requires: libbpf-devel
Requires: zlib-devel
%description devel %{_description}
This package contains library source intended for building other packages
which use "%{crate}" crate.
%files devel
%license LICENSE
%doc README.md
%{cargo_registry}/%{crate}-%{version_no_tilde}/
%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 "default" feature of "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "novendor" feature of "%{crate}" crate.
%files -n %{name}+novendor-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
# Remove bundled libbpf
rm -r libbpf
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog