add: typstyle (#7289) (#7334)

This commit is contained in:
Raboneko
2025-11-12 21:04:16 -08:00
committed by GitHub
parent 1e6c9e6296
commit 1e5ce71bdc
3 changed files with 70 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
project pkg {
rpm {
spec = "rust-typstyle.spec"
}
}
@@ -0,0 +1,64 @@
# Generated by rust2rpm 27
%bcond check 1
%global crate typstyle
Name: rust-typstyle
Version: 0.14.0
Release: 1%?dist
Summary: CLI for Typstyle
License: Apache-2.0
URL: https://crates.io/crates/typstyle
Source: %{crates_source}
Source1: https://raw.githubusercontent.com/typstyle-rs/typstyle/v%{version}/LICENSE
Packager: metcya <metcya@gmail.com>
BuildRequires: anda-srpm-macros rust-packaging >= 24 mold
%global _description %{expand:
The CLI for Typstyle.}
%description %{_description}
%package -n %{crate}
Summary: %{summary}
License: Apache-2.0
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENSE
%license LICENSE.dependencies
%doc README.md
%{_bindir}/typstyle
%pkg_completion -Bzfn %{crate}
%prep
%autosetup -n %{crate}-%{version} -p1
cp %{S:1} LICENSE
%cargo_prep_online
%build
%{cargo_license_summary_online}
%{cargo_license_online} > LICENSE.dependencies
%cargo_build
mkdir -p completions
for shell in bash zsh fish; do
target/rpm/%{crate} completions $shell > completions/%{crate}-completion.$shell
done
%install
%crate_install_bin
install -Dm644 "completions/%{crate}-completion.bash" "%{buildroot}/%{bash_completions_dir}/%{crate}"
install -Dm644 "completions/%{crate}-completion.zsh" "%{buildroot}/%{zsh_completions_dir}/_%{crate}"
install -Dm644 "completions/%{crate}-completion.fish" "%{buildroot}/%{fish_completions_dir}/%{crate}.fish"
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog
+1
View File
@@ -0,0 +1 @@
rpm.version(crates("typstyle"));