## START: Set by rpmautospec ## (rpmautospec version 0.7.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by rust2rpm 26 %bcond_without check # 0BSD OR MIT OR Apache-2.0 # Apache-2.0 OR MIT # BSD-3-Clause # MIT # MIT OR Apache-2.0 # MIT OR Zlib OR Apache-2.0 %global binary_license BSD-3-Clause AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR MIT) AND MIT AND (MIT OR Zlib OR Apache-2.0) # LICENSE.dependencies contains a full license breakdown %global crate blazesym-c %global crate_version 0.1.0-rc.0 Name: rust-blazesym-c Version: 0.1.0~rc.0 Release: %autorelease Summary: C bindings for blazesym License: BSD-3-Clause URL: https://crates.io/crates/blazesym-c Source: %{crates_source %{crate} %{crate_version}} # license file not included in subcrate # https://github.com/libbpf/blazesym/pull/767 Source: https://raw.githubusercontent.com/libbpf/blazesym/v0.2.0-rc.0/LICENSE # cbindgen.toml not included in subcrate Source: https://raw.githubusercontent.com/libbpf/blazesym/v0.2.0-rc.0/capi/cbindgen.toml # Manually created patch for downstream crate metadata changes # * include LICENSE # * declare stub capi feature for cargo-c Patch: blazesym-c-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: C bindings for blazesym.} %description %{_description} %package -n %{crate}-libs Summary: %{summary} License: %{binary_license} %description -n %{crate}-libs %{_description} %files -n %{crate}-libs %license %{crate_instdir}/LICENSE %license LICENSE.dependencies %doc CHANGELOG.md %doc README.md %{_libdir}/libblazesym_c.so.0.* %package -n %{crate}-devel Summary: %{summary} License: %{binary_license} Requires: %{crate}-libs%{?_isa} = %{version}-%{release} Requires: pkgconf-pkg-config %description -n %{crate}-devel %{_description} The %{crate}-devel package contains libraries and header files for developing applications that use %{crate}. %files -n %{crate}-devel %{_includedir}/blazesym_c %{_libdir}/libblazesym_c.so %{_libdir}/pkgconfig/blazesym_c.pc %package -n %{crate}-static Summary: %{summary} License: %{binary_license} Requires: %{crate}-devel%{?_isa} = %{version}-%{release} %description -n %{crate}-static %{_description} The %{crate}-static package contains library files for developing static applications that use %{crate}. %files -n %{crate}-static %{_libdir}/libblazesym_c.a %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 %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}+check-doc-snippets-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+check-doc-snippets-devel %{_description} This package contains library source intended for building other packages which use the "check-doc-snippets" feature of the "%{crate}" crate. %files -n %{name}+check-doc-snippets-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+generate-c-header-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+generate-c-header-devel %{_description} This package contains library source intended for building other packages which use the "generate-c-header" feature of the "%{crate}" crate. %files -n %{name}+generate-c-header-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{crate_version} -p1 %cargo_prep # copy in license file cp -p %{SOURCE1} . # copy in cbindgen.toml file cp -p %{SOURCE2} . %generate_buildrequires %cargo_generate_buildrequires -f capi echo "cargo-c" %build %cargo_build %cargo_cbuild %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install %cargo_install # FIXME: install shared library %cargo_cinstall %if %{with check} %check # * test data not included # * permission issues running tests in mock without root %cargo_test -- -- --exact --skip inspect::tests::lookup_dwarf --skip normalize::tests::normalize_build_id_reading --skip symbolize::tests::symbolize_configurable_debug_dirs --skip symbolize::tests::symbolize_no_debug_dirs --skip symbolize::tests::symbolize_elf_file_offset --skip symbolize::tests::symbolize_dwarf_demangle --skip normalize::tests::normalize_user_addrs_sorted --skip normalize::tests::normalize_user_addrs --skip symbolize::tests::symbolize_elf_dwarf_gsym --skip normalize::tests::normalize_user_addrs_unsorted_failure %endif %changelog ## START: Generated by rpmautospec * Tue Aug 27 2024 John Doe - 0.1.0~rc.0-1 - Uncommitted changes ## END: Generated by rpmautospec