diff --git a/anda/tools/buildsys/mise/anda.hcl b/anda/tools/buildsys/mise/anda.hcl new file mode 100644 index 0000000000..e99cc8f2d0 --- /dev/null +++ b/anda/tools/buildsys/mise/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rust-mise.spec" + } +} diff --git a/anda/tools/buildsys/mise/mise-fix-metadata-auto.diff b/anda/tools/buildsys/mise/mise-fix-metadata-auto.diff new file mode 100644 index 0000000000..03ea6c9b6b --- /dev/null +++ b/anda/tools/buildsys/mise/mise-fix-metadata-auto.diff @@ -0,0 +1,25 @@ +--- mise-2024.12.14/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ mise-2024.12.14/Cargo.toml 2024-12-19T16:42:09.096450+00:00 +@@ -461,17 +461,6 @@ + ] + default-features = false + +-[target."cfg(windows)".dependencies.self_update] +-version = "0.41" +-features = [ +- "archive-zip", +- "signatures", +-] +-default-features = false +- +-[target."cfg(windows)".dependencies.sevenz-rust] +-version = "0.6" +- + [lints.clippy] + borrowed_box = "allow" + +@@ -479,3 +468,4 @@ + level = "warn" + priority = 0 + check-cfg = ["cfg(coverage,coverage_nightly)"] ++ diff --git a/anda/tools/buildsys/mise/rust-mise.spec b/anda/tools/buildsys/mise/rust-mise.spec new file mode 100644 index 0000000000..cfd76491ac --- /dev/null +++ b/anda/tools/buildsys/mise/rust-mise.spec @@ -0,0 +1,106 @@ +# Generated by rust2rpm 27 +%bcond check 0 + +%global crate mise + +Name: rust-mise +Version: 2024.12.14 +Release: %autorelease +Summary: Front-end to your dev env +Provides: mise +License: MIT +URL: https://crates.io/crates/mise +Source: %{crates_source} +Source1: https://raw.githubusercontent.com/jdx/mise/refs/tags/v%version/man/man1/mise.1 +Source2: https://raw.githubusercontent.com/jdx/mise/refs/tags/v%version/completions/mise.bash +Source3: https://raw.githubusercontent.com/jdx/mise/refs/tags/v%version/completions/mise.fish +Source4: https://raw.githubusercontent.com/jdx/mise/refs/tags/v%version/completions/_mise +# Automatically generated patch to strip dependencies and normalize metadata +Patch: mise-fix-metadata-auto.diff +Packager: madonuko + +BuildRequires: anda-srpm-macros mold cargo-rpm-macros >= 24 +BuildRequires: pkgconfig(openssl) + +%global _description %{expand: +The front-end to your dev env.} + +%description %{_description} + +%package -n %{crate} +Summary: %{summary} +License: ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND BSL-1.0 AND (CC0-1.0 OR MIT-0 OR Apache-2.0) AND MIT AND (MIT AND (MIT OR Apache-2.0)) AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR BSD-1-Clause) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND Unicode-3.0 AND (Unlicense OR MIT) +URL: https://mise.jdx.dev/ + +%description -n %{crate} %{_description} + +%files -n %{crate} +%license LICENSE +%license src/assets/bash_zsh_support/LICENSE +%license LICENSE.dependencies +%doc README.md +%{_bindir}/mise +%_mandir/man1/mise.1.gz + + +%package -n %crate-bash-completion +Summary: Bash completion for %crate +Requires: %{crate} = %{version}-%{release} +Requires: bash-completion +Supplements: (%{crate} and bash-completion) + +%description -n %crate-bash-completion +Bash command line completion support for %{crate}. + +%package -n %crate-fish-completion +Summary: Fish completion for %{crate} +Requires: %{crate} = %{version}-%{release} +Requires: fish +Supplements: (%{crate} and fish) + +%description -n %crate-fish-completion +Fish command line completion support for %{crate}. + +%package -n %crate-zsh-completion +Summary: Zsh completion for %{crate} +Requires: %{crate} = %{version}-%{release} +Requires: zsh +Supplements: (%{crate} and zsh) + +%description -n %crate-zsh-completion +Zsh command line completion support for %{crate}. + + +%files -n %crate-bash-completion +%bash_completions_dir/mise.bash + +%files -n %crate-fish-completion +%fish_completions_dir/mise.fish + +%files -n %crate-zsh-completion +%zsh_completions_dir/_mise + + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep_online + +%build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies + +%install +%cargo_install +install -Dm644 %SOURCE1 %buildroot%_mandir/man1/mise.1 +install -Dm644 %SOURCE2 %buildroot%bash_completions_dir/mise.bash +install -Dm644 %SOURCE3 %buildroot%fish_completions_dir/mise.fish +install -Dm644 %SOURCE4 %buildroot%zsh_completions_dir/_mise + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Fri Dec 20 2024 madonuko - 2024.12.14-1 +- Initial package diff --git a/anda/tools/buildsys/mise/update.rhai b/anda/tools/buildsys/mise/update.rhai new file mode 100644 index 0000000000..bc2dba3227 --- /dev/null +++ b/anda/tools/buildsys/mise/update.rhai @@ -0,0 +1 @@ +rpm.version(crates("mise"));