From dcbb5286780d08da6259595b61bfe7d7c09095f4 Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Sun, 2 Mar 2025 06:47:35 -0800 Subject: [PATCH] add: chezmol (#3665) (#3677) * add: chezmol * fix the update script (cherry picked from commit fd5c856ad5e6840c6c1c0329bd84c959077f234a) Co-authored-by: madomado --- anda/langs/go/chezmol/anda.hcl | 5 +++ anda/langs/go/chezmol/chezmol.spec | 65 ++++++++++++++++++++++++++++++ anda/langs/go/chezmol/update.rhai | 1 + 3 files changed, 71 insertions(+) create mode 100644 anda/langs/go/chezmol/anda.hcl create mode 100644 anda/langs/go/chezmol/chezmol.spec create mode 100644 anda/langs/go/chezmol/update.rhai diff --git a/anda/langs/go/chezmol/anda.hcl b/anda/langs/go/chezmol/anda.hcl new file mode 100644 index 0000000000..442a8c08a6 --- /dev/null +++ b/anda/langs/go/chezmol/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "chezmol.spec" + } +} diff --git a/anda/langs/go/chezmol/chezmol.spec b/anda/langs/go/chezmol/chezmol.spec new file mode 100644 index 0000000000..6834d2657c --- /dev/null +++ b/anda/langs/go/chezmol/chezmol.spec @@ -0,0 +1,65 @@ +# Generated by go2rpm 1.15.0 +%bcond check 0 +%bcond bootstrap 0 + +# https://github.com/twpayne/chezmoi +%global goipath github.com/twpayne/chezmoi +Version: 2.59.1 + +%gometa -f + +%global common_description %{expand: +Manage your dotfiles across multiple diverse machines, securely.} + +%global golicenses LICENSE assets/chezmoi.io/docs/license.md\\\ + assets/chezmoi.io/docs/reference/commands/license.md +%global godocs .markdownlint-cli2.yaml README.md docs\\\ + assets/chezmoi.io/snippets/config-format.md\\\ + assets/chezmoi.io/snippets/common-flags/exclude.md\\\ + assets/chezmoi.io/snippets/common-flags/format.md\\\ + assets/chezmoi.io/snippets/common-flags/include.md\\\ + assets/chezmoi.io/snippets/common-flags/init.md\\\ + assets/chezmoi.io/snippets/common-flags/nul-path-\\\ + separator.md assets/chezmoi.io/snippets/common-\\\ + flags/parent-dirs.md\\\ + assets/chezmoi.io/snippets/common-flags/path-style.md\\\ + assets/chezmoi.io/snippets/common-flags/recursive.md\\\ + assets/chezmoi.io/snippets/common-flags/tree.md + +Name: chezmoi +Release: 1%?dist +Summary: Manage your dotfiles across multiple diverse machines, securely + +License: MIT +URL: %{gourl} +Source: %{gosource} + +%description %{common_description} + +#gopkg + +%prep +%goprep + +%build +%define gomodulesmode GO111MODULE=on +%gobuild -o %{gobuilddir}/bin/chezmoi . + +%install +#gopkginstall +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ + +%if %{without bootstrap} +%if %{with check} +%check +%gocheck +%endif +%endif + +%files +%license LICENSE +%doc README.md +%{_bindir}/chezmoi + +#gopkgfiles diff --git a/anda/langs/go/chezmol/update.rhai b/anda/langs/go/chezmol/update.rhai new file mode 100644 index 0000000000..375ad36766 --- /dev/null +++ b/anda/langs/go/chezmol/update.rhai @@ -0,0 +1 @@ +rpm.version(`

The latest version of chezmoi is ([\d.]+)`.find(get("https://www.chezmoi.io"), 1));