diff --git a/anda/lib/lovely-injector/anda.hcl b/anda/lib/lovely-injector/anda.hcl new file mode 100644 index 0000000000..68e56cfd6c --- /dev/null +++ b/anda/lib/lovely-injector/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + rpm { + spec = "lovely-injector.spec" + } + # arches = ["x86_64"] +} diff --git a/anda/lib/lovely-injector/lovely-injector.spec b/anda/lib/lovely-injector/lovely-injector.spec new file mode 100644 index 0000000000..a5e3e6761e --- /dev/null +++ b/anda/lib/lovely-injector/lovely-injector.spec @@ -0,0 +1,77 @@ +# Generated by rust2rpm 27 +%bcond check 1 +%bcond rust_nightly 1 +%global debug_package %{nil} +%if %{with rust_nightly} +%define __cargo /usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 RUSTFLAGS='%{build_rustflags}' $HOME/.cargo/bin/cargo +%define __rustc $HOME/.cargo/bin/rustc +%define __rustdoc $HOME/.cargo/bin/rustdoc +%endif + +# todo: update for 0.8 because dobby-sys is now a submodule +# I'm going to git clone the repo to prepare for 0.8 + +Name: lovely-injector +Version: 0.7.1 +Release: 1%?dist +Summary: A runtime lua injector for games built with LÖVE + +License: MIT +# LICENSE.dependencies contains a full license breakdown + +URL: https://github.com/ethangreen-dev/lovely-injector +Requires: love +Packager: Cappy Ishihara + +BuildRequires: mold anda-srpm-macros cargo-rpm-macros >= 24 +%if %{with rust_nightly} +BuildRequires: rustup +%endif + +%global _description %{expand: +%{summary}.} + +%description %{_description} + +%prep +rm -rf * +%git_clone %{url} v%{version} + +%if %{with rust_nightly} +rustup-init -y +. "$HOME/.cargo/env" +rustup toolchain install nightly +rustup override set nightly +%endif +%cargo_prep_online + + +%build +%{cargo_license_online} > LICENSE.dependencies +pushd crates/lovely-unix +%cargo_build +popd + +%install +# install library +install -Dm 644 target/rpm/liblovely.so %{buildroot}%{_libdir}/liblovely.so + +%if %{with check} +%check +pushd crates/lovely-unix +%cargo_test +popd +%endif + +%files +%license LICENSE.md +# Only include dobby-sys license for versions >= 0.8 +# Manually uncomment the next line when updating to 0.8 or later +# %license crates/dobby-sys/LICENSE +%license LICENSE.dependencies +%{_libdir}/liblovely.so +%doc README.md + +%changelog +* Mon May 26 2025 Cappy Ishihara - 0.7.1-1 +- Initial package diff --git a/anda/lib/lovely-injector/update.rhai b/anda/lib/lovely-injector/update.rhai new file mode 100644 index 0000000000..67a429e59d --- /dev/null +++ b/anda/lib/lovely-injector/update.rhai @@ -0,0 +1 @@ +rpm.global("ver",gh("ethangreen-dev/lovely-injector"));