From a22ac482d09c6231fc08e013877400e5e86e5d8d Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Mon, 29 Jul 2024 09:46:14 -0700 Subject: [PATCH] add: ruffle (#1754) (#1760) (cherry picked from commit 726e5b4ef886105dbdfeb369c7c56c604aac6aed) Co-authored-by: madomado --- anda/apps/ruffle/anda.hcl | 5 +++ anda/apps/ruffle/ruffle-nightly.spec | 64 ++++++++++++++++++++++++++++ anda/apps/ruffle/update.rhai | 13 ++++++ 3 files changed, 82 insertions(+) create mode 100644 anda/apps/ruffle/anda.hcl create mode 100644 anda/apps/ruffle/ruffle-nightly.spec create mode 100644 anda/apps/ruffle/update.rhai diff --git a/anda/apps/ruffle/anda.hcl b/anda/apps/ruffle/anda.hcl new file mode 100644 index 0000000000..fde064890a --- /dev/null +++ b/anda/apps/ruffle/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "ruffle-nightly.spec" + } +} diff --git a/anda/apps/ruffle/ruffle-nightly.spec b/anda/apps/ruffle/ruffle-nightly.spec new file mode 100644 index 0000000000..3e8d9037ce --- /dev/null +++ b/anda/apps/ruffle/ruffle-nightly.spec @@ -0,0 +1,64 @@ +%global ver 2024-07-29 +%global goodver %(echo %ver | sed 's/-//g') +%global __brp_mangle_shebangs %{nil} +%bcond_without mold + +%global _description %{expand: +Ruffle is an Adobe Flash Player emulator written in the Rust programming +language. Ruffle targets both the desktop and the web using WebAssembly.} + +Name: ruffle-nightly +Version: %goodver +Release: 1%?dist +Summary: A Flash Player emulator written in Rust +License: Apache-2.0 OR MIT +URL: https://ruffle.rs/ +Source0: https://github.com/ruffle-rs/ruffle/archive/refs/tags/nightly-%ver.tar.gz +Provides: ruffle +BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: anda-srpm-macros +BuildRequires: gcc-c++ cmake java +BuildRequires: java-latest-openjdk-headless +BuildRequires: pkgconfig(alsa) +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(xcb-cursor) +Packager: madonuko + +%description %_description + +%files +%doc README.md +%license LICENSE.md +%license LICENSE.dependencies +%_bindir/ruffle_desktop + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages which +use the "%{crate}" crate. + +%files devel +%license %{crate_instdir}/LICENSE.md +%doc %{crate_instdir}/CONTRIBUTING.md +%doc %{crate_instdir}/README.md +%{crate_instdir}/ + +%prep +%autosetup -n ruffle-nightly-%ver +%cargo_prep_online + +%build +%{cargo_license_online} > LICENSE.dependencies + +%install +cd desktop +%cargo_install + +%changelog +* Mon Jul 29 2024 madonuko +- Initial package diff --git a/anda/apps/ruffle/update.rhai b/anda/apps/ruffle/update.rhai new file mode 100644 index 0000000000..6a3f616015 --- /dev/null +++ b/anda/apps/ruffle/update.rhai @@ -0,0 +1,13 @@ +let releases = "https://api.github.com/repos/ruffle-rs/ruffle/releases".get().json_arr(); +for release in releases { + let tag = release.tag_name; + if !tag.starts_with("nightly-") { + continue; + } + tag.crop(8); // remove "nightly-" + rpm.global("ver", tag); + break; +} +if rpm.changed() { + rpm.release(); +}