From 82d3081f2f2aa0c5f7e4ecf22a64ea87f80f34cf Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Thu, 19 Sep 2024 07:53:21 -0700 Subject: [PATCH] add: stardust-armillary (#2050) (#2089) * initial package for stardust-armillary * move to stardust folder * fix directories in stardust-armillary * RPM bug workaround stardust-armillary.spec Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Remove conflicts Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update stardust-armillary.spec Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update stardust-armillary.spec Remove %cargo_build Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update stardust-armillary.spec Add packager Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update stardust-armillary.spec Remove runtime requirements Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update update.rhai Remove if statement from Rhai Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update update.rhai Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update update.rhai fix indentation Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update stardust-armillary.spec Lock cargo install Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> --------- Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> Co-authored-by: june-fish (cherry picked from commit 693c0c4b0bfb0f9011227a3b9382223cbe1c6aa3) Co-authored-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> --- anda/stardust/armillary/anda.hcl | 5 +++ .../armillary/stardust-armillary.spec | 39 +++++++++++++++++++ anda/stardust/armillary/update.rhai | 5 +++ 3 files changed, 49 insertions(+) create mode 100644 anda/stardust/armillary/anda.hcl create mode 100644 anda/stardust/armillary/stardust-armillary.spec create mode 100644 anda/stardust/armillary/update.rhai diff --git a/anda/stardust/armillary/anda.hcl b/anda/stardust/armillary/anda.hcl new file mode 100644 index 0000000000..261ee3ed48 --- /dev/null +++ b/anda/stardust/armillary/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "stardust-armillary.spec" + } +} diff --git a/anda/stardust/armillary/stardust-armillary.spec b/anda/stardust/armillary/stardust-armillary.spec new file mode 100644 index 0000000000..66ef284a67 --- /dev/null +++ b/anda/stardust/armillary/stardust-armillary.spec @@ -0,0 +1,39 @@ +%global commit 8ad02b636690170adbd4279fe3fc8265088cbcc2 +%global commit_date 20240726 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +# Exclude input files from mangling +%global __brp_mangle_shebangs_exclude_from ^/usr/src/.*$ + +Name: stardust-armillary +Version: %commit_date.%shortcommit +Release: 1%?dist +Summary: Model viewer for Stardust XR. +URL: https://github.com/StardustXR/armillary +Source0: %url/archive/%commit/armillary-%commit.tar.gz +License: MIT +BuildRequires: cargo cmake anda-srpm-macros cargo-rpm-macros mold + +Provides: armillary +Packager: Owen Zimmerman + +%description +A model viewer for Stardust XR which works great for hand tracking, pointers, and controllers. + +%prep +%autosetup -n armillary-%commit +%cargo_prep_online + +%build + +%install +%define __cargo_common_opts %{?_smp_mflags} -Z avoid-dev-deps --locked +%cargo_install + +%files +%_bindir/armillary +%license LICENSE +%doc README.md + +%changelog +* Sat Sep 7 2024 Owen-sz +- Package StardustXR armillary diff --git a/anda/stardust/armillary/update.rhai b/anda/stardust/armillary/update.rhai new file mode 100644 index 0000000000..4b75d1e64b --- /dev/null +++ b/anda/stardust/armillary/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("StardustXR/armillary")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); +}