From 0601401588c535644cb4f207e00477b3ba1342ee Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Wed, 19 Feb 2025 10:28:17 -0800 Subject: [PATCH] add: nstool (#3367) (#3446) * add: nstool * there are no f***ing docs (cherry picked from commit d0fd155c68670219b48a047c8626fede6eee69c3) Co-authored-by: sadlerm4 --- anda/tools/nstool/anda.hcl | 5 +++++ anda/tools/nstool/nstool.spec | 36 +++++++++++++++++++++++++++++++++++ anda/tools/nstool/update.rhai | 1 + 3 files changed, 42 insertions(+) create mode 100644 anda/tools/nstool/anda.hcl create mode 100644 anda/tools/nstool/nstool.spec create mode 100644 anda/tools/nstool/update.rhai diff --git a/anda/tools/nstool/anda.hcl b/anda/tools/nstool/anda.hcl new file mode 100644 index 0000000000..bda56e0522 --- /dev/null +++ b/anda/tools/nstool/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "nstool.spec" + } +} diff --git a/anda/tools/nstool/nstool.spec b/anda/tools/nstool/nstool.spec new file mode 100644 index 0000000000..47c0bc2f4a --- /dev/null +++ b/anda/tools/nstool/nstool.spec @@ -0,0 +1,36 @@ +%global debug_package %{nil} + +%global ver v1.9.2 +%global sanitized_ver %(echo "$( tr -d 'v' <<< %{ver} )") + +Name: nstool +Version: %{sanitized_ver} +Release: 1%{?dist} +Summary: General purpose read/extract tool for Nintendo Switch file formats + +License: MIT +URL: https://github.com/jakcron/nstool + +Packager: sadlerm + +BuildRequires: make gcc gcc-c++ +BuildRequires: anda-srpm-macros + +%description +General purpose reading/extraction tool for Nintendo Switch file formats. + +%prep +%git_clone %{url} %{ver} + +%build +%make_build deps +%make_build program + +%install +install -Dm755 bin/%{name} %{buildroot}%{_bindir}/%{name} + +%files +%license LICENSE +%doc README.md SWITCH_KEYS.md +%{_bindir}/%{name} + diff --git a/anda/tools/nstool/update.rhai b/anda/tools/nstool/update.rhai new file mode 100644 index 0000000000..0e939ed185 --- /dev/null +++ b/anda/tools/nstool/update.rhai @@ -0,0 +1 @@ +rpm.global("ver", gh_tag("jakcron/nstool"));