# Generated by rust2rpm 21 %bcond_without check %global debug_package %{nil} %global crate libadwaita-sys Name: rust-%{crate} Version: 0.1.0 Release: %autorelease Summary: FFI bindings for libadwaita # Upstream license specification: MIT License: MIT URL: https://crates.io/crates/libadwaita-sys Source0: %{crates_source} # FIXME: fetch from cargo once upstream release a new version with license inside Source1: https://gitlab.gnome.org/World/Rust/libadwaita-rs/-/raw/v0.1/LICENCE#/%{crate}-%{version_no_tilde}-LICENCE ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging >= 21 BuildRequires: pkgconfig(libadwaita-1) >= 1.0.0 %global _description %{expand: FFI bindings for libadwaita.} %description %{_description} %package devel Summary: %{summary} BuildArch: noarch Requires: pkgconfig(libadwaita-1) >= 1.0.0 %description devel %{_description} This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel %license %{crate_instdir}/LICENCE %{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+default-devel %{_description} This package contains library source intended for building other packages which use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+dox-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+dox-devel %{_description} This package contains library source intended for building other packages which use the "dox" feature of the "%{crate}" crate. %files -n %{name}+dox-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep # FIXME: fetch from cargo once upstream release a new version with license inside cp -pr %{_sourcedir}/%{crate}-%{version_no_tilde}-LICENCE LICENCE %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %changelog %autochangelog