# Generated by rust2rpm 27 %bcond check 1 %global debug_package %{nil} %global crate hidapi Name: rust-hidapi2 Version: 2.6.3 Release: %autorelease Summary: Rust-y wrapper around hidapi License: MIT URL: https://crates.io/crates/hidapi Source: %{crates_source} # Automatically generated patch to strip dependencies and normalize metadata Patch: hidapi-fix-metadata-auto.diff # Manually created patch for downstream crate metadata changes # * Bump udev dependency to 0.9 which is compatible # * Change defaults to shared rather than static, drop illumos Patch: hidapi-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(hidapi-hidraw) BuildRequires: pkgconfig(hidapi-libusb) %global _description %{expand: Rust-y wrapper around hidapi.} %description %{_description} %package devel Summary: %{summary} BuildArch: noarch Requires: pkgconfig(libudev) %description devel %{_description} This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel %license %{crate_instdir}/LICENSE.txt %license %{crate_instdir}/etc/hidapi/LICENSE-bsd.txt %license %{crate_instdir}/etc/hidapi/LICENSE-gpl3.txt %license %{crate_instdir}/etc/hidapi/LICENSE-orig.txt %license %{crate_instdir}/etc/hidapi/LICENSE.txt %doc %{crate_instdir}/README.md %{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}+linux-native-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+linux-native-devel %{_description} This package contains library source intended for building other packages which use the "linux-native" feature of the "%{crate}" crate. %files -n %{name}+linux-native-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+linux-shared-hidraw-devel Summary: %{summary} BuildArch: noarch Requires: pkgconfig(hidapi-hidraw) %description -n %{name}+linux-shared-hidraw-devel %{_description} This package contains library source intended for building other packages which use the "linux-shared-hidraw" feature of the "%{crate}" crate. %files -n %{name}+linux-shared-hidraw-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+linux-shared-libusb-devel Summary: %{summary} BuildArch: noarch Requires: pkgconfig(hidapi-libusb) %description -n %{name}+linux-shared-libusb-devel %{_description} This package contains library source intended for building other packages which use the "linux-shared-libusb" feature of the "%{crate}" crate. %files -n %{name}+linux-shared-libusb-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep rm etc/hidapi/libusb/.gitignore %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %changelog %autochangelog