# Generated by rust2rpm 28 %bcond check 1 %global crate siguldry-pkcs11 Name: rust-siguldry-pkcs11 Version: 1.0.0 Release: %autorelease Summary: Minimal PKCS#11 module to sign content using a Siguldry server License: MIT URL: https://crates.io/crates/siguldry-pkcs11 Source: %{crates_source} # * registration file for p11-kit Source10: p11-kit.module # * Fix an assumption that C’s char type is signed # * https://github.com/fedora-infra/siguldry/pull/161 Patch: 0001-Fix-an-assumption-that-C-s-char-type-is-signed.patch # Manually created patch for downstream crate metadata changes # * Omit integration tests that expect to run in the workspace # * Be flexible with allowed version of asn1, RHBZ#2402490 Patch: siguldry-pkcs11-fix-metadata.diff # It's not written or tested with 32-bit architectures in mind. # # It is expected to run in environments where kernels are built, # but we don't build any 32-bit kernels. # # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: A minimal PKCS#11 module that implements the interfaces required to sign content using the Siguldry server.} %description %{_description} %package -n %{crate} Summary: %{summary} # (MIT OR Apache-2.0) AND Unicode-DFS-2016 # Apache-2.0 # 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 # BSL-1.0 # ISC # LGPL-2.0-or-later # MIT # MIT OR Apache-2.0 # Unicode-3.0 # Unlicense OR MIT License: %{shrink: MIT AND Apache-2.0 AND BSD-3-Clause AND BSL-1.0 AND ISC AND LGPL-2.0-or-later AND Unicode-3.0 AND Unicode-DFS-2016 AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND Unlicense OR MIT } # LICENSE.dependencies contains a full license breakdown Requires: siguldry >= 0.5.0 %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE %license LICENSE.dependencies %doc CHANGELOG.md %doc README.md %{_libdir}/pkcs11/libsiguldry_pkcs11.so %{_datadir}/p11-kit/modules/siguldry.module # These are all co-owned with p11-kit and pkcs11 modules %dir %{_datadir}/p11-kit %dir %{_datadir}/p11-kit/modules %dir %{_libdir}/pkcs11 %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install install -D -p -m 0755 target/rpm/libsiguldry_pkcs11.so %{buildroot}%{_libdir}/pkcs11/libsiguldry_pkcs11.so install -D -p -m 0644 %{SOURCE10} %{buildroot}%{_datadir}/p11-kit/modules/siguldry.module %if %{with check} %check %cargo_test %endif %changelog %autochangelog