diff options
-rw-r--r-- | packaging/rust-avif-serialize.spec | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/packaging/rust-avif-serialize.spec b/packaging/rust-avif-serialize.spec index 7603d89..42ebc25 100644 --- a/packaging/rust-avif-serialize.spec +++ b/packaging/rust-avif-serialize.spec @@ -28,7 +28,10 @@ Requires: rust-arrayvec # ========================================================== # dev-dependencies # ========================================================== -# BuildRequires: rust-avif-parse +%if 0%{?run_tests} +BuildRequires: rust-avif-parse +BuildRequires: rust-mp4parse +%endif %description @@ -56,6 +59,19 @@ cp %{SOURCE1} . install -d -m 0755 %{buildroot}%{_rust_dylibdir} install -m 0644 lib%{real_crate_name}.so %{buildroot}/%{_rust_dylibdir}/lib%{real_crate_name}.so +%check +%if 0%{?run_tests} +%{rustc_std_build} --test --crate-type=dylib \ + --crate-name=%{real_crate_name} \ + %{?rustc_edition:--edition=%{rustc_edition}} \ + %rust_dylib_extern arrayvec \ + %rust_dylib_extern avif_parse \ + %rust_dylib_extern mp4parse \ + ./src/lib.rs + +./%{real_crate_name} +%endif + %clean %post -p /sbin/ldconfig |