From 46bb0965f3fe707c314f337c562eb1b8a553dd39 Mon Sep 17 00:00:00 2001 From: Gilver Date: Fri, 7 Mar 2025 08:05:30 -0600 Subject: [PATCH] refactor(pokeget-rs): Bundled provides and use `%git_clone` (#3772) * Drop global date Signed-off-by: Gilver * Bundled packages are versioned differently, my bad Signed-off-by: Gilver * Since I know how `%git_clone` works now maybe... Signed-off-by: Gilver * Update pokeget-rs.spec Signed-off-by: Gilver * Oops Signed-off-by: Gilver * Actually... Signed-off-by: Gilver * Right...RPMBuild Signed-off-by: Gilver * Cleanup unused macros? Signed-off-by: Gilver * Macro everything Signed-off-by: Gilver --------- Signed-off-by: Gilver --- anda/misc/pokeget-rs/pokeget-rs.spec | 14 +++----------- anda/misc/pokeget-rs/update.rhai | 1 - 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/anda/misc/pokeget-rs/pokeget-rs.spec b/anda/misc/pokeget-rs/pokeget-rs.spec index 9902d125b1..aa430bf5e8 100644 --- a/anda/misc/pokeget-rs/pokeget-rs.spec +++ b/anda/misc/pokeget-rs/pokeget-rs.spec @@ -1,34 +1,26 @@ %global pname pokesprite %global pcommit c5aaa610ff2acdf7fd8e2dccd181bca8be9fcb3e -%global pshortcommit %(c=%{pcommit}; echo ${c:0:7}) -%global pcommit_date 20220622 %global shortname pokeget Name: %{shortname}-rs Version: 1.6.3 -Release: 2%{?dist} +Release: 3%{?dist} SourceLicense: MIT License: MIT AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) 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-2-Clause AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Apache-2.0) AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) Summary: A better Rust version of pokeget. URL: https://github.com/talwat/%{name} -Source0: %{url}/archive/refs/tags/%{version}.tar.gz -Source1: https://github.com/msikma/%{pname}/archive/%{pcommit}/%{pname}-%{pcommit}.tar.gz#/%{pname}-%{pshortcommit}.tar.gz BuildRequires: anda-srpm-macros BuildRequires: cargo-rpm-macros BuildRequires: mold Provides: pokeget = %{version}-%{release} -Provides: bundled(%{pname}) = 2.7.0^%{pcommit_date}.%{pshortcommit} +Provides: bundled(%{pname}) = %{pcommit} Packager: Gilver E. %description Successor to pokeget, written in Rust. %prep -%autosetup -n %{name}-%{version} -mkdir -p data/%{pname} -pushd data/%{pname} -/usr/bin/gzip -dc '%{SOURCE1}' | /usr/bin/tar -xof - --strip-components=1 -popd +%git_clone %{url} %{version} %cargo_prep_online %build diff --git a/anda/misc/pokeget-rs/update.rhai b/anda/misc/pokeget-rs/update.rhai index 6e9adc7f26..30c9297bf3 100644 --- a/anda/misc/pokeget-rs/update.rhai +++ b/anda/misc/pokeget-rs/update.rhai @@ -5,5 +5,4 @@ if rpm.changed () { let json = get(url).json(); let c = json.2.sha; rpm.global("pcommit", c); - rpm.global("pcommit_date", date()); // could potentially result in the wrong date, fix if it becomes a problem }