# Generated by rust2rpm 23 %global _rpm_strip_disable 1 %global debug_package %{nil} %global crate ciborium-ll %global real_crate_name ciborium_ll %global rustc_edition 2021 Name: rust-ciborium-ll Version: 0.2.0 Release: 1 Summary: Low-level CBOR codec primitives License: Apache-2.0 URL: https://crates.io/crates/ciborium-ll Source: %{crate}-%{version}.tar.gz Source1: %{name}.manifest Source2: LICENSE-APACHE # ========================================================== # BuildRequires # specifies build-time dependencies for the package # ========================================================== BuildRequires: rust BuildRequires: rust-ciborium-io BuildRequires: rust-half Requires: rust-ciborium-io Requires: rust-half # ========================================================== # dev-dependencies # ========================================================== %if 0%{?run_tests} BuildRequires: rust-hex %endif %description Low-level CBOR codec primitives. %prep %setup -q cp %{SOURCE1} . cp %{SOURCE2} . # ========================================================== # build section # crate-type : dylib, proc-macro, cdylib, bin, etc. # ========================================================== %build %{rustc_std_build} --crate-type=dylib \ --crate-name=%{real_crate_name} \ %{?rustc_edition:--edition=%{rustc_edition}} \ %rust_dylib_extern ciborium_io \ %rust_dylib_extern half \ --cfg='feature="std"' \ --cfg='feature="alloc"' \ ./src/lib.rs # ========================================================== # install section # ========================================================== %install install -d -m 0755 %{buildroot}%{_rust_dylibdir} install -m 0644 lib%{real_crate_name}.so %{buildroot}/%{_rust_dylibdir}/lib%{real_crate_name}.so %check %if 0%{?run_tests} %{rustc_std_build} --test --crate-type=dylib \ --crate-name=%{real_crate_name} \ %{?rustc_edition:--edition=%{rustc_edition}} \ %rust_dylib_extern ciborium_io \ %rust_dylib_extern half \ %rust_dylib_extern hex \ --cfg='feature="std"' \ --cfg='feature="alloc"' \ ./src/lib.rs ./%{real_crate_name} %endif %clean %post -p /sbin/ldconfig %postun -p /sbin/ldconfig # ========================================================== # files section # ========================================================== %files %manifest %{name}.manifest %license LICENSE-APACHE %{_rust_dylibdir}/lib%{real_crate_name}.so