From 2e0a1969fd6126e59bc62118629c1e94e93a284b Mon Sep 17 00:00:00 2001 From: Gilver Date: Mon, 17 Mar 2025 23:31:13 -0500 Subject: [PATCH] [f41] fix(uwufetch): Make Git based and fix Git cloning (#3951) (#3976) --- anda/misc/uwufetch/anda.hcl | 3 +++ anda/misc/uwufetch/update.rhai | 9 +++++++- anda/misc/uwufetch/uwufetch.spec | 38 +++++++++++++++++++++++++------- 3 files changed, 41 insertions(+), 9 deletions(-) diff --git a/anda/misc/uwufetch/anda.hcl b/anda/misc/uwufetch/anda.hcl index 69406c2907..623d2105d5 100644 --- a/anda/misc/uwufetch/anda.hcl +++ b/anda/misc/uwufetch/anda.hcl @@ -2,4 +2,7 @@ project pkg { rpm { spec = "uwufetch.spec" } + labels { + nightly = 1 + } } diff --git a/anda/misc/uwufetch/update.rhai b/anda/misc/uwufetch/update.rhai index 7ddbe03216..599bb2194c 100644 --- a/anda/misc/uwufetch/update.rhai +++ b/anda/misc/uwufetch/update.rhai @@ -1 +1,8 @@ -rpm.version(gh("ad-oliviero/uwufetch")); +rpm.global("commit", gh_commit("ad-oliviero/uwufetch")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); + let ver = gh_tag("ad-oliviero/uwufetch"); + ver.crop(1); + rpm.global("ver", ver); +} diff --git a/anda/misc/uwufetch/uwufetch.spec b/anda/misc/uwufetch/uwufetch.spec index e2f944a55c..b033f1aa9e 100644 --- a/anda/misc/uwufetch/uwufetch.spec +++ b/anda/misc/uwufetch/uwufetch.spec @@ -1,33 +1,55 @@ +%global commit 28b471b813d1c9aab77eeeb61f65304e586fb275 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20240423 +%global ver 2.1 +%global debug_package %{nil} + Name: uwufetch -Version: 2.1 +Version: %{ver}^%{commit_date}git.%{shortcommit} Release: 1%?dist Summary: A meme system info tool for Linux, based on nyan/uwu trend on r/linuxmasterrace. License: GPL-3.0 URL: https://github.com/ad-oliviero/uwufetch BuildRequires: make gcc git anda-srpm-macros +Requires: freecolor +Requires: xwininfo +Recommends: lshw %description A meme system info tool for (almost) all your Linux/Unix-based systems, based on the nyan/UwU trend on r/linuxmasterrace. +%package devel +Summary: Development files for UwUFetch. +Requires: %{name} + +%description devel +This package contains delevoplent files for UwUFetch. + %prep -git clone https://github.com/TheDarkBug/uwufetch.git . -git checkout %{version} +%git_clone %{url} %{commit} %build %make_build %install -make install DESTDIR=%{?buildroot}%{_prefix} -mkdir %{?buildroot}%{_libdir} -mv %{?buildroot}%{_prefix}/lib/libfetch.so %{?buildroot}%{_libdir}/libfetch.so -rm -rf %{?buildroot}%{_includedir} +%make_install DESTDIR=%{buildroot}%{_prefix} +mkdir -p %{buildroot}%{_libdir} +mv %{buildroot}%{_prefix}/lib/libfetch.so %{buildroot}%{_libdir}/libfetch.so %files +%doc CODE_OF_CONDUCT.md +%doc README.md +%license LICENSE +%license res/COPYRIGHT.md +%dir %{_prefix}/lib/uwufetch %{_prefix}/lib/uwufetch/* -%{_libdir}/libfetch.so %{_mandir}/man1/uwufetch.1.gz %{_bindir}/uwufetch +%files devel +%{_libdir}/libfetch.so +%{_includedir}/fetch.h + %changelog * Thu Jun 22 2023 Alyxia Sother - Initial package.