# rust-kurbu5-sys.spec.in — Fedora RPM packaging for the kurbu5-sys Rust crate # # Source package: rust-kurbu5-sys # Source: crates.io release tarball (%%{crates_source}) # # Binary packages produced: # rust-kurbu5-sys-devel Rust crate sources in the system Cargo registry # rust-kurbu5-sys-doc Changelog documentation # # Vendor tarball preparation (requires network, run once per release): # curl -LO https://static.crates.io/crates/kurbu5-sys/kurbu5-sys-%%{version}.crate # tar xf kurbu5-sys-%%{version}.crate # cd kurbu5-sys-%%{version} # cargo generate-lockfile # cargo vendor vendor > vendor-config.toml # tar czf rust-kurbu5-sys-%%{version}-vendor.tar.gz vendor/ vendor-config.toml Cargo.lock # # Build ordering: this package has no inter-kurbu5 dependencies and can be # built first (Stage 1). All other kurbu5 crates that link against system # Kerberos libraries depend on this package for their build metadata. # # Note: build.rs runs bindgen against krb5.h and kdb.h at build time. The # generated bindings are tied to the krb5-devel version installed in the build # root. Rebuild this package whenever krb5-devel is updated in Fedora. # clang-devel must be present because bindgen uses libclang to parse C headers. %global debug_package %{nil} %global crate kurbu5-sys %global snapdate 202604141848 %global snapcommit b7d20e6 Name: rust-%{crate} Version: 0.1.1 Release: 1%{?dist} Summary: Raw FFI bindings to MIT Kerberos libkrb5 and KDB plugin API License: BSD-2-Clause URL: https://crates.io/crates/%{crate} Source0: %{crates_source} Source1: %{name}-%{version}-vendor.tar.gz BuildRequires: cargo-rpm-macros >= 25 # build.rs runs bindgen against krb5.h and kdb.h. # MIT Kerberos 1.22 is the minimum version required by this crate. BuildRequires: krb5-devel >= 1.22 # bindgen uses libclang to parse C headers. BuildRequires: clang-devel BuildRequires: pkgconf-pkg-config %description Raw FFI bindings to the MIT Kerberos libkrb5 and KDB plugin API, generated at build time by bindgen against the installed krb5-devel headers. Provides the low-level C types, constants, and function signatures needed to write Kerberos plugin modules in Rust. The optional otp feature enables internal MIT Kerberos OTP preauth types and their encode/decode/free symbols, which are used by KDC and client OTP preauth plugins. This crate uses a build script (build.rs) that links against libkrb5 and runs bindgen at compile time. The generated bindings reflect the exact krb5-devel version installed in the build root. Rebuild this package whenever krb5-devel is updated in Fedora. %package -n rust-%{crate}-devel Summary: Rust crate sources for kurbu5-sys (MIT Kerberos raw FFI bindings) BuildArch: noarch Provides: crate(kurbu5-sys) = %{version} Provides: crate(kurbu5-sys/default) = %{version} Provides: crate(kurbu5-sys/otp) = %{version} %description -n rust-%{crate}-devel Rust crate sources for kurbu5-sys, installed into the system Cargo registry so that other Rust packages can use it as a build-time dependency. Provides raw FFI bindings to MIT Kerberos libkrb5 and the KDB plugin API, generated by bindgen. The otp feature enables internal OTP preauth types. %package -n rust-%{crate}-doc Summary: Documentation for the kurbu5-sys Rust crate BuildArch: noarch %description -n rust-%{crate}-doc Changelog and documentation for the kurbu5-sys raw FFI bindings Rust crate. %prep %autosetup -n %{crate}-%{version} tar xf %{SOURCE1} %cargo_prep -v vendor %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %check # Run only library unit tests; integration tests require a running KDC. %cargo_test -- --lib %files %license LICENSE %files -n rust-%{crate}-devel %license LICENSE %{cargo_registry}/%{crate}-%{version}/ %files -n rust-%{crate}-doc %license LICENSE %doc CHANGELOG.md %changelog * Tue Apr 14 2026 Alexander Bokovoy - 0.1.1-1 - Update to version 0.1.1 * Tue Apr 14 2026 Alexander Bokovoy - 0.1.0-1 - Initial package for kurbu5-sys 0.1.0