# rust-synta-mtc.spec.in — Fedora RPM packaging for the synta-mtc Rust crate # # Source package: rust-synta-mtc # Source: crates.io release tarball (%%{crates_source}) # # Binary packages produced: # rust-synta-mtc-devel Rust crate sources in the system Cargo registry # rust-synta-mtc-doc README, SERDE guide, and example programs # # Vendor tarball preparation (requires network, run once per release): # curl -LO https://static.crates.io/crates/synta-mtc/synta-mtc-%%{version}.crate # tar xf synta-mtc-%%{version}.crate # cd synta-mtc-%%{version} # cargo generate-lockfile # cargo vendor vendor > vendor-config.toml # tar czf rust-synta-mtc-%%{version}-vendor.tar.gz vendor/ vendor-config.toml Cargo.lock # # Build ordering: requires rust-synta-devel, rust-synta-certificate-devel, # rust-synta-derive-devel, and rust-synta-codegen-devel (build-dep). # External deps vendored: sha2, smallvec (serde and openssl are optional). %global debug_package %{nil} %global crate synta-mtc Name: rust-%{crate} Version: 0.1.3 Release: 1%{?dist} Summary: Merkle Tree Certificates (MTC) implementation for the synta library License: MIT OR Apache-2.0 URL: https://crates.io/crates/%{crate} Source0: %{crates_source} Source1: %{name}-%{version}-vendor.tar.gz # License files are not included in the crates.io tarball; ship them separately. Source2: LICENSE-MIT Source3: LICENSE-APACHE BuildRequires: cargo-rpm-macros >= 25 # Rust crate build dependencies (inter-synta; not yet in Fedora repo). BuildRequires: rust-synta-devel >= 0.1.2 BuildRequires: rust-synta-certificate-devel >= 0.1.2 BuildRequires: rust-synta-derive-devel >= 0.1.1 BuildRequires: rust-synta-codegen-devel >= 0.1.2 %description synta-mtc implements the Merkle Tree Certificates (MTC) draft specification on top of the synta ASN.1 library and synta-certificate. It provides ASN.1 type definitions, a TrustAnchorStore for verifying MTC-format trust anchors, and utilities for working with MTC certificate log entries. # ────────────────────────────────────────────────────────────────────────────── # rust-synta-mtc-devel — Rust crate sources # ────────────────────────────────────────────────────────────────────────────── %package -n rust-%{crate}-devel Summary: Rust crate sources for synta-mtc (Merkle Tree Certificates) BuildArch: noarch Provides: crate(synta-mtc) = %{version} Provides: crate(synta-mtc/default) = %{version} Provides: crate(synta-mtc/derive) = %{version} Provides: crate(synta-mtc/serde) = %{version} Provides: crate(synta-mtc/std) = %{version} # Runtime dependencies on synta core and X.509 types. Requires: rust-synta-devel >= 0.1.2 Requires: rust-synta-certificate-devel >= 0.1.2 # The derive feature (enabled by default) activates synta-derive. Requires: rust-synta-derive-devel >= 0.1.1 # sha2 and smallvec are always-on deps; consumers need rust-sha2-devel and # rust-smallvec-devel. serde is optional (rust-serde-devel). %description -n rust-%{crate}-devel Rust crate sources for synta-mtc, installed into the system Cargo registry so that other Rust packages can use it as a build-time dependency. Implements the Merkle Tree Certificates draft specification, providing ASN.1 type definitions, trust anchor store verification, and MTC log entry utilities built on top of synta and synta-certificate. # ────────────────────────────────────────────────────────────────────────────── # rust-synta-mtc-doc — documentation # ────────────────────────────────────────────────────────────────────────────── %package -n rust-%{crate}-doc Summary: Documentation and examples for the synta-mtc Rust crate BuildArch: noarch %description -n rust-%{crate}-doc README, serde integration guide, performance and security documentation, and example programs for the synta-mtc Merkle Tree Certificates Rust crate. # ══════════════════════════════════════════════════════════════════════════════ # PREP # ══════════════════════════════════════════════════════════════════════════════ %prep %autosetup -n %{crate}-%{version} tar xf %{SOURCE1} %cargo_prep -v vendor cp %{SOURCE2} LICENSE-MIT cp %{SOURCE3} LICENSE-APACHE # synta-certificate's build.rs (via find_asn1_dir in synta-codegen) looks for # ASN.1 schemas at CARGO_MANIFEST_DIR/asn1 when built as a vendored dependency. # The vendor entry only carries source files; copy schemas from vendor/synta*. # cargo-checksum.json only covers listed files; extra unlisted files are safe. # Use glob to handle both vendor/synta/ (crates.io) and vendor/synta-*/ (local). mkdir -p vendor/synta-certificate/asn1 cp vendor/synta*/asn1/*.asn1 vendor/synta-certificate/asn1/ # ══════════════════════════════════════════════════════════════════════════════ # GENERATE BUILD REQUIREMENTS # ══════════════════════════════════════════════════════════════════════════════ %generate_buildrequires %cargo_generate_buildrequires # ══════════════════════════════════════════════════════════════════════════════ # BUILD # ══════════════════════════════════════════════════════════════════════════════ %build %cargo_build # ══════════════════════════════════════════════════════════════════════════════ # INSTALL # ══════════════════════════════════════════════════════════════════════════════ %install %cargo_install # ══════════════════════════════════════════════════════════════════════════════ # CHECK # ══════════════════════════════════════════════════════════════════════════════ %check # property_tests has harness = false (libtest-mimic runner); run only the # standard library unit tests to stay within the vendored deps. %cargo_test -- --lib # ══════════════════════════════════════════════════════════════════════════════ # FILES # ══════════════════════════════════════════════════════════════════════════════ # ── rust-synta-mtc (meta, license carrier) ──────────────────────────────────── %files %license LICENSE-MIT LICENSE-APACHE # ── rust-synta-mtc-devel ────────────────────────────────────────────────────── %files -n rust-%{crate}-devel %license LICENSE-MIT LICENSE-APACHE %{cargo_registry}/%{crate}-%{version}/ # ── rust-synta-mtc-doc ──────────────────────────────────────────────────────── %files -n rust-%{crate}-doc %license LICENSE-MIT LICENSE-APACHE %doc README.md %doc SERDE.md %doc docs/ %doc examples/ # ══════════════════════════════════════════════════════════════════════════════ # CHANGELOG # ══════════════════════════════════════════════════════════════════════════════ %changelog * Sun Apr 05 2026 Synta Contributors - 0.1.3-1 - Version bump to match workspace * Mon Mar 23 2026 Synta Contributors - 0.1.2-1 - Initial individual crate package (split from synta workspace spec)