# rust-synta.spec.in — Fedora RPM packaging for the synta Rust crate # # Source package: rust-synta # Source: crates.io release tarball (%%{crates_source}) # # Binary packages produced: # rust-synta-devel Rust crate sources in the system Cargo registry # rust-synta-doc README documentation # # Vendor tarball preparation (requires network, run once per release): # curl -LO https://static.crates.io/crates/synta/synta-%%{version}.crate # tar xf synta-%%{version}.crate # cd synta-%%{version} # cargo generate-lockfile # cargo vendor vendor > vendor-config.toml # tar czf rust-synta-%%{version}-vendor.tar.gz vendor/ vendor-config.toml Cargo.lock # # Build ordering: build rust-synta-derive first (synta optionally depends on # it via the derive feature). Build rust-synta-codegen at any point (no # deps). Build rust-synta-certificate and rust-synta-krb5 after this package. %global debug_package %{nil} %global crate synta %global snapdate 202604102231 %global snapcommit 3aa63bf Name: rust-%{crate} Version: 0.1.4 Release: 1.%{snapdate}.git%{snapcommit}%{?dist} Summary: ASN.1 parser, decoder, and encoder library with DER/BER support License: MIT OR Apache-2.0 URL: https://crates.io/crates/%{crate} Source0: %{crates_source} Source1: %{name}-%{version}-vendor.tar.gz BuildRequires: cargo-rpm-macros >= 25 # Rust crate build dependencies (inter-synta; not yet in Fedora repo). BuildRequires: rust-synta-derive-devel >= 0.1.1 %description Synta is a high-performance ASN.1 (Abstract Syntax Notation One) parser, decoder, and encoder library written in Rust. It supports zero-copy DER and BER decoding and full DER encoding, with optional derive-macro support for automatic codec trait implementation on user-defined types. # ────────────────────────────────────────────────────────────────────────────── # rust-synta-devel — Rust crate sources # ────────────────────────────────────────────────────────────────────────────── %package -n rust-%{crate}-devel Summary: Rust crate sources for synta (core ASN.1 parser/encoder library) BuildArch: noarch Provides: crate(synta) = %{version} Provides: crate(synta/alloc) = %{version} Provides: crate(synta/default) = %{version} Provides: crate(synta/derive) = %{version} Provides: crate(synta/serde) = %{version} Provides: crate(synta/std) = %{version} Provides: crate(synta/unchecked) = %{version} # The derive feature (enabled by default) activates synta-derive. Requires: rust-synta-derive-devel >= 0.1.1 # The serde feature activates the serde crate (optional; users add # BuildRequires: rust-serde-devel themselves when enabling this feature). %description -n rust-%{crate}-devel Rust crate sources for the core synta ASN.1 library, installed into the system Cargo registry so that other Rust packages can use it as a build-time dependency. Provides zero-copy DER/BER decoding and full DER encoding. The optional derive feature (enabled by default) generates Decode and Encode trait implementations for user-defined Rust types via the synta-derive proc-macro. # ────────────────────────────────────────────────────────────────────────────── # rust-synta-doc — documentation # ────────────────────────────────────────────────────────────────────────────── %package -n rust-%{crate}-doc Summary: Documentation for the synta Rust crate BuildArch: noarch %description -n rust-%{crate}-doc README and documentation for the synta core ASN.1 Rust crate. # ══════════════════════════════════════════════════════════════════════════════ # PREP # ══════════════════════════════════════════════════════════════════════════════ %prep %autosetup -n %{crate}-%{version} tar xf %{SOURCE1} %cargo_prep -v vendor # ══════════════════════════════════════════════════════════════════════════════ # GENERATE BUILD REQUIREMENTS # ══════════════════════════════════════════════════════════════════════════════ %generate_buildrequires %cargo_generate_buildrequires # ══════════════════════════════════════════════════════════════════════════════ # BUILD # ══════════════════════════════════════════════════════════════════════════════ %build %cargo_build # ══════════════════════════════════════════════════════════════════════════════ # INSTALL # ══════════════════════════════════════════════════════════════════════════════ %install %cargo_install # ══════════════════════════════════════════════════════════════════════════════ # CHECK # ══════════════════════════════════════════════════════════════════════════════ %check # Restrict to library unit tests only. The synta dev-dependency on # synta-certificate creates a circular build-time requirement (synta-certificate # requires rust-synta-devel); integration tests that exercise that dev-dep are # therefore skipped here. They are covered by the rust-synta-certificate build. %cargo_test -- --lib # ══════════════════════════════════════════════════════════════════════════════ # FILES # ══════════════════════════════════════════════════════════════════════════════ # ── rust-synta (meta, license carrier) ─────────────────────────────────────── %files %license LICENSE-MIT LICENSE-APACHE # ── rust-synta-devel ────────────────────────────────────────────────────────── %files -n rust-%{crate}-devel %license LICENSE-MIT LICENSE-APACHE %{cargo_registry}/%{crate}-%{version}/ # ── rust-synta-doc ──────────────────────────────────────────────────────────── %files -n rust-%{crate}-doc %license LICENSE-MIT LICENSE-APACHE %doc README.md # ══════════════════════════════════════════════════════════════════════════════ # CHANGELOG # ══════════════════════════════════════════════════════════════════════════════ %changelog * Fri Apr 10 2026 Synta Contributors - 0.1.4-1 - Version bump to match workspace 0.1.4 release * 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)