## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; 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 # Should tests be enabled? %bcond check 1 # As this package is NOT published to crates.io, we MUST NOT install crate sources for it in the local registry # Per: https://docs.fedoraproject.org/en-US/packaging-guidelines/Rust/#_rust_applications_non_crates_io_crates %define cargo_install_lib 0 Name: tbtools Summary: Thunderbolt/USB4 debugging tools Version: 0.6.0 Release: %autorelease # Most source files lack an explicit license # The main LICENSE file is MIT # scripts/verify-sysfs.sh: GPL-2.0-only, but not packaged at present SourceLicense: MIT AND GPL-2.0-only # License summary of integrated Rust packages: # (this is generated by the macro below, anyone building this package should update it) # # (MIT OR Apache-2.0) AND Unicode-DFS-2016 # Apache-2.0 # Apache-2.0 OR BSL-1.0 # Apache-2.0 OR MIT # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT # BSD-2-Clause OR Apache-2.0 OR MIT # MIT # MIT OR Apache-2.0 # Unlicense OR MIT # Reduced per the license policy on redundant expressions: # https://docs.fedoraproject.org/en-US/legal/license-field/#_special_rules_for_or_expressions # Because Apache-2.0 and MIT appear in the AND expression, OR expressions that contain only those # two can be removed, but all other OR expressions MUST be preserved. %define simplified_license %{shrink: Apache-2.0 AND MIT AND Unicode-DFS-2016 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (Unlicense OR MIT) } License: %{simplified_license} URL: https://github.com/intel/tbtools Source: %{url}/archive/v%{version}/tbtools-%{version}.tar.gz BuildRequires: cargo-rpm-macros >= 26 BuildRequires: make # While it builds fine as of 0.6.0, nobody needs this on 32-bit, since # Fedora no longer ships a 32-bit OS variant. # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} %description This is a collection of tools for Linux Thunderbolt/USB4 development, debugging and validation but may be useful to others as well. %prep %autosetup -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build # Skip using the Makefile to call cargo build, since we have a macro for that %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install # Since we skip cargo install in the Makefile, use our macro instead %cargo_install # Setting CARGO=/usr/bin/true skips the cargo install in the Makefile without modifying it PREFIX=%{buildroot}%{_prefix} %make_install CARGO=/usr/bin/true # TODO: Consider bothering upstream for manpage or using help2man %if %{with check} %check %cargo_test %endif %files %license LICENSE %license LICENSE.dependencies %doc README.md %doc src/bin/tbman/tbman.png %doc TODO # TODO: rpmlint complains of unused deps, hard to get rid of in Rust projects #tbtools.aarch64: W: unused-direct-shlib-dependency /usr/bin/tbman /lib64/libm.so.6 #tbtools.aarch64: W: unused-direct-shlib-dependency /usr/bin/tbpd /lib64/libudev.so.1 %{_bindir}/lstb %{_bindir}/tbadapters %{_bindir}/tbauth %{_bindir}/tbdump %{_bindir}/tbget %{_bindir}/tblist %{_bindir}/tbman %{_bindir}/tbmargin %{_bindir}/tbpd %{_bindir}/tbset %{_bindir}/tbtrace %{bash_completions_dir}/tbtools-completion.bash %{bash_completions_dir}/tbadapters %{bash_completions_dir}/tbauth %{bash_completions_dir}/tbdump %{bash_completions_dir}/tbget %{bash_completions_dir}/tblist %{bash_completions_dir}/tbmargin %{bash_completions_dir}/tbset %{bash_completions_dir}/tbtrace %{_datadir}/tbtools/ %changelog ## START: Generated by rpmautospec * Wed Aug 06 2025 Alexander F. Lent - 0.6.0-2 - Drop ix86 support * Wed Aug 06 2025 Alexander F. Lent - 0.6.0-1 - Initial import (fixes rhbz#2363587) ## END: Generated by rpmautospec