From 3fcd60ffa4860ffc8ca2891d003133a9919be37a Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Sun, 15 Jun 2025 20:28:31 -0700 Subject: [PATCH] add: cbmem (#3323) (#5466) * Add: cbmem * Fix url and date * add --depth 1 and cd into make directory * Commit suggestions * use make build macro * Fix git clone * Try the funny * Fix license * Add global compiler thing at the top * Add licenses/docs and remove -std thing * fix build flag macro * Add wno error flag * Add other licenses * Install all licenses * meow * Update cbmem.spec * Update cbmem.spec * meow * Update version and changelog, remove global build flags This should work lol --------- (cherry picked from commit 04c6da74993ef28992fa108cd71baf732f7cc05e) Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> Signed-off-by: madomado Co-authored-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> Co-authored-by: madomado --- anda/tools/cbmem/anda.hcl | 5 +++++ anda/tools/cbmem/cbmem.spec | 32 ++++++++++++++++++++++++++++++++ anda/tools/cbmem/update.rhai | 1 + 3 files changed, 38 insertions(+) create mode 100644 anda/tools/cbmem/anda.hcl create mode 100644 anda/tools/cbmem/cbmem.spec create mode 100644 anda/tools/cbmem/update.rhai diff --git a/anda/tools/cbmem/anda.hcl b/anda/tools/cbmem/anda.hcl new file mode 100644 index 0000000000..09a390e7b6 --- /dev/null +++ b/anda/tools/cbmem/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "cbmem.spec" + } +} diff --git a/anda/tools/cbmem/cbmem.spec b/anda/tools/cbmem/cbmem.spec new file mode 100644 index 0000000000..6155f7be85 --- /dev/null +++ b/anda/tools/cbmem/cbmem.spec @@ -0,0 +1,32 @@ +%define debug_package %nil + +Name: cbmem +Version: 25.03 +Release: 1%?dist +Summary: Prints out coreboot mem table information +URL: https://review.coreboot.org +License: BSD-3-Clause AND Apache-2.0 AND CC-BY-SA-3.0 AND GPL-2.0-only AND GPL-3.0-or-later AND ISC AND BSD-2-Clause-Patent AND BSD-4-Clause-UC AND CC-PDDC AND GPL-2.0-or-later AND HPND-sell-varient AND LGPL-2.1-or-later AND BSD-2-Clause AND CC-BY-4.0 AND GPL-3.0-only AND HPND AND X11 AND MIT +BuildRequires: gcc g++ make cmake ncurses-devel iasl git anda-srpm-macros +Packager: Owen Zimmerman + +%description +Prints out coreboot mem table information in JSON by default, and also implements the basic cbmem -list and -console commands. + +%prep +%git_clone %url/coreboot %version + +%build +cd util/cbmem +%make_build CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" + +%install +install -Dm 755 util/cbmem/cbmem %buildroot%_bindir/cbmem + +%files +%doc util/cbmem/description.md +%license LICENSES/* +%{_bindir}/cbmem + +%changelog +* Sun Jun 15 2025 Owen Zimmerman +- Initial Package diff --git a/anda/tools/cbmem/update.rhai b/anda/tools/cbmem/update.rhai new file mode 100644 index 0000000000..7e27695ddc --- /dev/null +++ b/anda/tools/cbmem/update.rhai @@ -0,0 +1 @@ +rpm.version(gh_tag("coreboot/coreboot"));