# Generated by rust2rpm 26 %bcond_without check # prevent library files from being installed %global cargo_install_lib 0 %global crate hidpipe Name: rust-hidpipe Version: 0.1.1 Release: %autorelease Summary: Pass hid devices to micro vms License: MIT URL: https://crates.io/crates/hidpipe Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * Bump udev to 0.9: https://github.com/AsahiLinux/hidpipe/pull/6 Patch: hidpipe-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 26 BuildRequires: systemd-rpm-macros %global _description %{expand: Pass hid devices to micro vms.} %description %{_description} %package -n %{crate} Summary: %{summary} # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT # MIT # MIT OR Apache-2.0 License: (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND MIT AND (MIT OR Apache-2.0) # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE %license LICENSE.dependencies %doc README.md %{_bindir}/hidpipe-client %{_bindir}/hidpipe-server %{_userunitdir}/hidpipe.service %{_userunitdir}/hidpipe.socket %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install %cargo_install install -Dpm0644 -t %{buildroot}%{_userunitdir} etc/systemd/user/hidpipe.{service,socket} %post %systemd_user_post hidapi.service %preun %systemd_user_preun hidapi.service %postun %systemd_user_postun_with_restart hidapi.service %if %{with check} %check %cargo_test %endif %changelog %autochangelog