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

137 lines
3.5 KiB

# Generated by rust2rpm 24
4 years ago
%bcond_without check
%global debug_package %{nil}
%global crate libbpf-sys
%global libbpf_version 1.2.0
Name: rust-libbpf-sys
Version: 1.2.1
Release: %autorelease
4 years ago
Summary: Rust bindings to libbpf from the Linux kernel
License: BSD-2-Clause
4 years ago
URL: https://crates.io/crates/libbpf-sys
%global upstream_version %{version}+v%{libbpf_version}
Source: %{crates_source %{crate} %{upstream_version}}
# Manually created patch for downstream crate metadata changes
# * remove version suffix from crate version
# * downgrade bindgen to 0.63
Patch: libbpf-sys-fix-metadata.diff
4 years ago
BuildRequires: rust-packaging >= 21
Provides: bundled(libbpf) = %{libbpf_version}
4 years ago
%global _description %{expand:
Rust bindings to libbpf from the Linux kernel.}
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
Requires: elfutils-libelf-devel
Requires: kernel-headers
4 years ago
Requires: zlib-devel
%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}/libbpf/LICENSE
%license %{crate_instdir}/libbpf/LICENSE.BSD-2-Clause
%license %{crate_instdir}/libbpf/LICENSE.LGPL-2.1
%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
%package -n %{name}+bindgen-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+bindgen-devel %{_description}
This package contains library source intended for building other packages which
use the "bindgen" feature of the "%{crate}" crate.
%files -n %{name}+bindgen-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.
4 years ago
%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
%package -n %{name}+vendored-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+vendored-devel %{_description}
This package contains library source intended for building other packages which
use the "vendored" feature of the "%{crate}" crate.
%files -n %{name}+vendored-devel
%ghost %{crate_instdir}/Cargo.toml
4 years ago
%prep
%autosetup -n %{crate}-%{upstream_version} -p1
# these should use system libs
rm -rf elfutils zlib
4 years ago
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
echo 'elfutils-libelf-devel'
echo 'kernel-headers'
echo 'zlib-devel'
4 years ago
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog