From 9a320db5ea5d17eaee3ec4f085b03db031ab1da2 Mon Sep 17 00:00:00 2001 From: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> Date: Thu, 19 Sep 2024 09:28:25 -0500 Subject: [PATCH] add: stardust-flatland (#2049) * initial package for stardust-flatland * move to stardust folder * RPM bug workaround stardust-flatland.spec Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update stardust-flatland.spec Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update anda/stardust/flatland/stardust-flatland.spec Co-authored-by: madomado Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update anda/stardust/flatland/stardust-flatland.spec Co-authored-by: madomado Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update anda/stardust/flatland/stardust-flatland.spec Co-authored-by: madomado Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Test fix stardust-flatland.spec Testing CI build without 'Requires: libgcc glibc' Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update stardust-flatland.spec Add packager 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 anda.hcl Fix indentation Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update anda/stardust/flatland/update.rhai Co-authored-by: madomado Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update stardust-flatland.spec Lock cargo install Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update stardust-flatland.spec Unify summaries Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update stardust-flatland.spec add environment variable before cargo build 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 Co-authored-by: madomado (cherry picked from commit ad0f73487591ede66821a0ce83bdd5b0bd3392d6) --- anda/stardust/flatland/anda.hcl | 8 ++++ anda/stardust/flatland/stardust-flatland.spec | 41 +++++++++++++++++++ anda/stardust/flatland/update.rhai | 5 +++ 3 files changed, 54 insertions(+) create mode 100644 anda/stardust/flatland/anda.hcl create mode 100644 anda/stardust/flatland/stardust-flatland.spec create mode 100644 anda/stardust/flatland/update.rhai diff --git a/anda/stardust/flatland/anda.hcl b/anda/stardust/flatland/anda.hcl new file mode 100644 index 0000000000..9f0199171a --- /dev/null +++ b/anda/stardust/flatland/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "stardust-flatland.spec" + } + labels { + nightly = 1 + } +} diff --git a/anda/stardust/flatland/stardust-flatland.spec b/anda/stardust/flatland/stardust-flatland.spec new file mode 100644 index 0000000000..5d5e880220 --- /dev/null +++ b/anda/stardust/flatland/stardust-flatland.spec @@ -0,0 +1,41 @@ +%global commit b83f2eced868fe71248ba7681df978698eb978f0 +%global commit_date 20240824 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +# Exclude input files from mangling +%global __brp_mangle_shebangs_exclude_from ^/usr/src/.*$ + +Name: stardust-flatland +Version: %commit_date.%shortcommit +Release: 1%?dist +Summary: Flatland for Stardust XR. +URL: https://github.com/StardustXR/flatland +Source0: %url/archive/%commit/flatland-%commit.tar.gz +License: MIT +BuildRequires: cargo cmake anda-srpm-macros cargo-rpm-macros mold + +Provides: flatland +Packager: Owen Zimmerman + +%description +%summary + +%prep +%autosetup -n flatland-%commit +%cargo_prep_online + +%build +STARDUST_RES_PREFIXES=/usr/share + +%install +%define __cargo_common_opts %{?_smp_mflags} -Z avoid-dev-deps --locked +STARDUST_RES_PREFIXES=%_datadir +%cargo_install + +%files +%_bindir/flatland +%license LICENSE +%doc README.md + +%changelog +* Sat Sep 7 2024 Owen-sz +- Package StardustXR Flatland diff --git a/anda/stardust/flatland/update.rhai b/anda/stardust/flatland/update.rhai new file mode 100644 index 0000000000..0688d89201 --- /dev/null +++ b/anda/stardust/flatland/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("StardustXR/flatland")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); +}