From cdee8c01b830c338f3ff1be13964427bf2329757 Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Wed, 21 May 2025 03:21:19 -0700 Subject: [PATCH] add: exquisite-linux-templates (#4861) (#4947) * add: exquisite-linux-templates * make this noarch * meaoj;aslk * alskdjf (cherry picked from commit 42fe3cb4ec6bda1ad62138f5e4a7ad84e47483fd) Co-authored-by: madomado --- anda/misc/exquisite-linux-templates/anda.hcl | 9 ++++++ .../exquisite-linux-templates.spec | 30 +++++++++++++++++++ .../exquisite-linux-templates/update.rhai | 6 ++++ andax/bump_extras.rhai | 4 +++ 4 files changed, 49 insertions(+) create mode 100644 anda/misc/exquisite-linux-templates/anda.hcl create mode 100644 anda/misc/exquisite-linux-templates/exquisite-linux-templates.spec create mode 100644 anda/misc/exquisite-linux-templates/update.rhai diff --git a/anda/misc/exquisite-linux-templates/anda.hcl b/anda/misc/exquisite-linux-templates/anda.hcl new file mode 100644 index 0000000000..39fc622eea --- /dev/null +++ b/anda/misc/exquisite-linux-templates/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "exquisite-linux-templates.spec" + } + labels { + weekly = 2 + } +} diff --git a/anda/misc/exquisite-linux-templates/exquisite-linux-templates.spec b/anda/misc/exquisite-linux-templates/exquisite-linux-templates.spec new file mode 100644 index 0000000000..ea2df6541e --- /dev/null +++ b/anda/misc/exquisite-linux-templates/exquisite-linux-templates.spec @@ -0,0 +1,30 @@ +%global commit 4f5ee4e125a5c202c30b620d8df4cb1a1494e8cd +%global shortcommit %{sub %commit 1 7} +%global commit_date 20250516 + +Name: exquisite-linux-templates +Version: 0~%{commit_date}git.%shortcommit +Release: 1%?dist +Summary: A collection of shared file templates for use in $HOME/Templates on Linux systems +License: MIT +URL: https://codeberg.org/nathandyer/%name +Source0: %url/archive/%commit.tar.gz +BuildArch: noarch + +%description +%summary. + +Note that this only works with English. You should rename `~/Templates` to the corresponding +string for your user language for the templates to take effect. + +%prep +%autosetup -n %name + +%install +mkdir -p %buildroot%_sysconfdir/skel/Templates +mv templates %buildroot%_sysconfdir/skel/Templates/%name + +%files +%doc README.md +%license LICENSE +%_sysconfdir/skel/Templates diff --git a/anda/misc/exquisite-linux-templates/update.rhai b/anda/misc/exquisite-linux-templates/update.rhai new file mode 100644 index 0000000000..7f6a3c1afd --- /dev/null +++ b/anda/misc/exquisite-linux-templates/update.rhai @@ -0,0 +1,6 @@ +import "andax/bump_extras.rhai" as bump; + +rpm.global("commit", bump::codeberg_commit("nathandyer/exquisite-linux-templates")); +if rpm.changed() { + rpm.global("commit_date", date()); +} diff --git a/andax/bump_extras.rhai b/andax/bump_extras.rhai index 03e95abc3c..184bbacec5 100644 --- a/andax/bump_extras.rhai +++ b/andax/bump_extras.rhai @@ -1,3 +1,7 @@ +fn codeberg_commit(repo) { + return get(`https://codeberg.org/api/v1/repos/${repo}/commits?stat=false&verification=false&files=false&limit=1`).json_arr()[0].sha; +} + fn as_bodhi_ver(branch) { if branch.starts_with("el") { branch.crop(2);