Currently, there are no macros for building and installing C API libraries built from crates. Packages like rust-rav1e[1] or the recently added dolby_vision[2] have to manually run cargo cbuild and cargo cinstall.
Please add %cargo_cbuild and %cargo_cinstall macros to automate this.
[1] https://src.fedoraproject.org/rpms/rust-rav1e/blob/rawhide/f/rust-rav1e.spec#_548 [2] https://src.fedoraproject.org/rpms/rust-dolby_vision/blob/rawhide/f/rust-dolby_vision.spec#_141
This has been on my mental TODO list for a while, thanks for filing a ticket to keep track of this.
Note that the actual macros will likely be added in the cargo-c package directly and not in rust-packaging / cargo-rpm-macros. Otherwise cargo-rpm-macros would need Requires: cargo-c.
Requires: cargo-c
Of course, that makes perfect sense.
I finally got around to do this, here's my PR for cargo-c to add macros: https://src.fedoraproject.org/rpms/rust-cargo-c/pull-request/3
I tested them with a rav1e build locally, would be great if you could take a look if there's something I missed.
This has been merged to cargo-c and is now available on Fedora 37+. Will be merged to EPEL9 once Rust is new enough to build the version of cargo-c from Fedora there.
Metadata Update from @decathorpe: - Issue status updated to: Closed (was: Open)