mirror of
https://github.com/terrapkg/packages.git
synced 2026-06-08 20:57:38 +00:00
* add: lovely-injector
* don't actually check the version because rpm version comp isnt a thing yet
* make injector exclusive for x86_64
* try pushd into lovely-unix only
* fix broken formatting
(cherry picked from commit 1461a2fce3)
Co-authored-by: Pornpipat Popum <cappy@cappuchino.xyz>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
project pkg {
|
||||
rpm {
|
||||
spec = "lovely-injector.spec"
|
||||
}
|
||||
# arches = ["x86_64"]
|
||||
}
|
||||
@@ -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 <cappy@cappuchino.xyz>
|
||||
|
||||
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 <cappy@fyralabs.com> - 0.7.1-1
|
||||
- Initial package
|
||||
@@ -0,0 +1 @@
|
||||
rpm.global("ver",gh("ethangreen-dev/lovely-injector"));
|
||||
Reference in New Issue
Block a user