## START: Set by rpmautospec ## (rpmautospec version 0.8.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by rust2rpm 27 %bcond check 1 Name: rs_dfu Version: 0.7.0 Release: %autorelease Summary: USB Device Firmware Upgrade (DFU) implementation based on nusb crate License: MIT # LICENSE.dependencies contains a full license breakdown URL: https://github.com/EdgeTX/rs-dfu Source: https://github.com/EdgeTX/rs-dfu/archive/refs/tags/v%{version}.tar.gz#/rs-dfu-%{version}.tar.gz Patch1: rs_dfu-cmake.patch BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: %{summary}.} %description %{_description} %package devel Summary: Development files for %{name} %description devel The %{name}-devel package contains header file and static library for developing applications that use %{name}. %prep %autosetup -n rs-dfu-%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %{cargo_build} --workspace %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install install -d %{buildroot}%{_libdir} install ./target/rpm/lib*.a %{buildroot}%{_libdir} install -d %{buildroot}%{_bindir} install ./target/rpm/rdfu %{buildroot}%{_bindir} install -d %{buildroot}%{_includedir} install ./target/cxxbridge/rs-dfu/src/lib.rs.h %{buildroot}%{_includedir}/%{name}.h install -d %{buildroot}%{_libdir}/cmake install ./cmake/rs_dfu-config.cmake %{buildroot}%{_libdir}/cmake %if %{with check} %check %cargo_test %endif %files %license LICENSE %license LICENSE.dependencies %doc README.md %{_bindir}/rdfu %files devel %{_includedir}/%{name}.h %{_libdir}/lib%{name}.a %{_libdir}/cmake/%{name}-config.cmake %changelog ## START: Generated by rpmautospec * Thu Feb 12 2026 John Doe - 0.7.0-1 - Uncommitted changes ## END: Generated by rpmautospec