# Generated by rust2rpm 25 %bcond_without check %global crate bpfman ## START DO NOT OVERRIDE: These are generated at runtime by .packit.sh %global commit 58edf66e7d9d381bb47263627b87cb5bd0c4a7c6 %global shortcommit 58edf66e %global base_version 0.4.1 ## END DO NOT OVERRIDE %global package_version %{base_version}%{?prerelease:~%{prerelease}} %global upstream_version %{base_version}%{?prerelease:-%{prerelease}} Name: bpfman Version: %{package_version} Release: 1.20240503204821392536.main.1.58edf66e%{?dist} Summary: An eBPF program manager SourceLicense: Apache-2.0 # (Apache-2.0 OR MIT) AND BSD-3-Clause # (MIT OR Apache-2.0) AND Unicode-DFS-2016 # 0BSD OR MIT OR Apache-2.0 # Apache-2.0 # Apache-2.0 OR BSL-1.0 # Apache-2.0 OR ISC OR MIT # Apache-2.0 OR MIT # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT # BSD-2-Clause OR Apache-2.0 OR MIT # BSD-3-Clause # ISC # MIT # MIT AND BSD-3-Clause # MIT OR Apache-2.0 # MIT OR Apache-2.0 OR BSD-1-Clause # MIT OR Apache-2.0 OR Zlib # MIT OR Zlib OR Apache-2.0 # MPL-2.0 # Unlicense OR MIT # Zlib OR Apache-2.0 OR MIT License: Apache-2.0 AND Unicode-DFS-2016 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 # LICENSE.dependencies contains a full license breakdown URL: https://bpfman.io Source0: https://github.com/bpfman/bpfman/archive/%{commit}/%{name}-%{shortcommit}.tar.gz # The vendor tarball is created using cargo-vendor-filterer to remove Windows # related files (https://github.com/coreos/cargo-vendor-filterer) # cargo vendor-filterer --format tar.gz --prefix vendor bpfman-bpfman-vendor.tar.gz Source1: bpfman-bpfman-vendor.tar.gz BuildRequires: cargo-rpm-macros >= 25 BuildRequires: systemd-rpm-macros BuildRequires: openssl-devel # TODO: Generate Provides for all of the vendored dependencies %global _description %{expand: An eBPF Program Manager.} %description %{_description} %prep %autosetup %{name}-%{version_no_tilde} -n %{name}-%{commit} -p1 -a1 # Source1 is vendored dependencies tar -xoaf %{SOURCE1} # Let the macros setup Cargo.toml to use vendored sources %cargo_prep -v vendor %cargo_license_summary %cargo_license %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %{cargo_vendor_manifest} %install install -Dpm 0755 \ -t %{buildroot}%{_sbindir} \ ./target/release/bpfman install -Dpm 0755 \ -t %{buildroot}%{_sbindir} \ ./target/release/bpfman-ns install -Dpm 0755 \ -t %{buildroot}%{_sbindir} \ ./target/release/bpfman-rpc install -Dpm 644 \ -t %{buildroot}%{_unitdir} \ ./scripts/bpfman.socket install -Dpm 644 \ -t %{buildroot}%{_unitdir} \ ./scripts/bpfman.service %post %systemd_post bpfman.socket %preun %systemd_preun bpfman.socket %postun %systemd_postun_with_restart bpfman.socket %files %license LICENSE-APACHE %license LICENSE-BSD2 %license LICENSE-GPL2 %license LICENSE.dependencies %license cargo-vendor.txt %doc README.md %{_sbindir}/bpfman %{_sbindir}/bpfman-ns %{_sbindir}/bpfman-rpc %{_unitdir}/bpfman.socket %{_unitdir}/bpfman.service %changelog %autochangelog