From 31a8f0f9ffdc1d972ff7759c89af5eaab0e1aa96 Mon Sep 17 00:00:00 2001 From: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> Date: Mon, 16 Sep 2024 08:30:40 -0500 Subject: [PATCH] add: stardust-magnetar (#2062) * initial package for stardust-server * add missing build deps * move to stardust folder * inisital package for stardust-black-hole * RPM bug workaround stardust-black-hole.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 anda/stardust/black-hole/update.rhai Co-authored-by: madomado Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update anda/stardust/black-hole/stardust-black-hole.spec Co-authored-by: madomado Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update anda/stardust/black-hole/stardust-black-hole.spec Co-authored-by: madomado Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update anda/stardust/black-hole/stardust-black-hole.spec Co-authored-by: madomado Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update stardust-black-hole.spec Add packager Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update anda.hcl Fix name Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update stardust-black-hole.spec Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update update.rhai Fix name Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update stardust-black-hole.spec fix deps Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update stardust-black-hole.spec Fix files 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/stardust/black-hole/update.rhai Co-authored-by: madomado Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * fix directories issue * actually fix directories error * Initial package for stardust-atmosphere * WIP * Update anda.hcl Remove empty space Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update stardust-magnetar.spec Lock cargo install Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Update stardust-magnetar.spec Unify summaries 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 20c366df9131761555812de13010d5aef3f7691e) --- anda/stardust/magnetar/anda.hcl | 8 ++++ anda/stardust/magnetar/stardust-magnetar.spec | 41 +++++++++++++++++++ anda/stardust/magnetar/update.rhai | 5 +++ 3 files changed, 54 insertions(+) create mode 100644 anda/stardust/magnetar/anda.hcl create mode 100644 anda/stardust/magnetar/stardust-magnetar.spec create mode 100644 anda/stardust/magnetar/update.rhai diff --git a/anda/stardust/magnetar/anda.hcl b/anda/stardust/magnetar/anda.hcl new file mode 100644 index 0000000000..59f223d713 --- /dev/null +++ b/anda/stardust/magnetar/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "stardust-magnetar.spec" + } + labels { + nightly = 1 + } +} diff --git a/anda/stardust/magnetar/stardust-magnetar.spec b/anda/stardust/magnetar/stardust-magnetar.spec new file mode 100644 index 0000000000..bfb79000e8 --- /dev/null +++ b/anda/stardust/magnetar/stardust-magnetar.spec @@ -0,0 +1,41 @@ +%global commit 48064b84b71d27ceea00b5d2f19dcbf21d75f554 +%global commit_date 20240831 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +# Exclude input files from mangling +%global __brp_mangle_shebangs_exclude_from ^/usr/src/.*$ + +Name: stardust-magnetar +Version: %commit_date.%shortcommit +Release: 1%?dist +Summary: Workspaces client for Stardust XR. +URL: https://github.com/StardustXR/magnetar +Source0: %url/archive/%commit/magnetar-%commit.tar.gz +License: MIT +BuildRequires: cargo cmake anda-srpm-macros cargo-rpm-macros mold libudev-devel g++ libinput-devel libxkbcommon-x11-devel + +Provides: magnetar +Packager: Owen Zimmerman + +%description +%summary + +%prep +%autosetup -n magnetar-%commit +%cargo_prep_online + +%build + +%install +%define __cargo_common_opts %{?_smp_mflags} -Z avoid-dev-deps --locked +%cargo_install + + +%files +%_bindir/magnetar +%license LICENSE +%doc README.md + +%changelog +* Wed Sep 11 2024 Owen-sz +- Package StardustXR magnetar + diff --git a/anda/stardust/magnetar/update.rhai b/anda/stardust/magnetar/update.rhai new file mode 100644 index 0000000000..6bca40b722 --- /dev/null +++ b/anda/stardust/magnetar/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("StardustXR/magnetar")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); +} \ No newline at end of file