diff --git a/anda/stardust/gravity/anda.hcl b/anda/stardust/gravity/anda.hcl new file mode 100644 index 0000000000..58522742e6 --- /dev/null +++ b/anda/stardust/gravity/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "stardust-gravity.spec" + } + labels { + nightly = 1 + } +} \ No newline at end of file diff --git a/anda/stardust/gravity/stardust-gravity.spec b/anda/stardust/gravity/stardust-gravity.spec new file mode 100644 index 0000000000..a0c5f398dc --- /dev/null +++ b/anda/stardust/gravity/stardust-gravity.spec @@ -0,0 +1,40 @@ +%global commit 96787ed3139717ea6061f6e259e9fed3e483274a +%global commit_date 20240821 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +# Exclude input files from mangling +%global __brp_mangle_shebangs_exclude_from ^/usr/src/.*$ + +Name: stardust-gravity +Version: %commit_date.%shortcommit +Release: 1%?dist +Summary: Utility to launch apps and Stardust XR clients spatially. +URL: https://github.com/StardustXR/gravity +Source0: %url/archive/%commit/gravity-%commit.tar.gz +License: MIT +BuildRequires: cargo cmake anda-srpm-macros cargo-rpm-macros mold + +Provides: gravity +Packager: Owen Zimmerman + +%description +%summary + +%prep +%autosetup -n gravity-%commit +%cargo_prep_online + +%build + +%install +%define __cargo_common_opts %{?_smp_mflags} -Z avoid-dev-deps --locked +%cargo_install + + +%files +%_bindir/gravity +%license LICENSE +%doc README.md + +%changelog +* Wed Sep 11 2024 Owen-sz +- Package StardustXR gravity diff --git a/anda/stardust/gravity/update.rhai b/anda/stardust/gravity/update.rhai new file mode 100644 index 0000000000..d139dccddc --- /dev/null +++ b/anda/stardust/gravity/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("StardustXR/gravity")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); +} \ No newline at end of file