From 4e22c3698222fd8383a5a911fce29cf8f71bd289 Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Tue, 30 Dec 2025 15:56:19 -0800 Subject: [PATCH] add: typos (#8753) (#8770) --- anda/tools/typos/anda.hcl | 5 +++++ anda/tools/typos/typos.spec | 42 ++++++++++++++++++++++++++++++++++++ anda/tools/typos/update.rhai | 1 + 3 files changed, 48 insertions(+) create mode 100644 anda/tools/typos/anda.hcl create mode 100644 anda/tools/typos/typos.spec create mode 100644 anda/tools/typos/update.rhai diff --git a/anda/tools/typos/anda.hcl b/anda/tools/typos/anda.hcl new file mode 100644 index 0000000000..0c76df5141 --- /dev/null +++ b/anda/tools/typos/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "typos.spec" + } +} diff --git a/anda/tools/typos/typos.spec b/anda/tools/typos/typos.spec new file mode 100644 index 0000000000..a867e18309 --- /dev/null +++ b/anda/tools/typos/typos.spec @@ -0,0 +1,42 @@ +%global crate typos-cli +%define debug_package %{nil} + +Name: typos +Version: 1.40.0 +Release: 1%{?dist} +Summary: Source Code Spelling Correction + +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/typos-cli +Source0: %{crates_source} +Source1: https://raw.githubusercontent.com/crate-ci/%{name}/refs/tags/v%{version}/LICENSE-MIT +Source2: https://raw.githubusercontent.com/crate-ci/%{name}/refs/tags/v%{version}/LICENSE-APACHE + +BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: mold + +%description +Finds and corrects spelling mistakes among source code. + +%prep +%autosetup -n %{crate}-%{version} +cp %{S:1} . +cp %{S:2} . +%cargo_prep_online + +%build +%cargo_build +%cargo_license_summary_online +%{cargo_license_online} > LICENSE.dependencies + +%install +install -Dm 644 target/rpm/%{name} -t %{buildroot}%{_bindir} + +%files +%license LICENSE-MIT LICENSE-APACHE LICENSE.dependencies +%doc README.md +%{_bindir}/%{name} + +%changelog +* Sun Dec 28 2025 metcya - 1.40.0-1 +- Initial package diff --git a/anda/tools/typos/update.rhai b/anda/tools/typos/update.rhai new file mode 100644 index 0000000000..aa4d889714 --- /dev/null +++ b/anda/tools/typos/update.rhai @@ -0,0 +1 @@ +rpm.version(crates("typos-cli"));