diff --git a/anda/games/modrinth/anda.hcl b/anda/games/modrinth/anda.hcl new file mode 100644 index 0000000000..da4bb4dc88 --- /dev/null +++ b/anda/games/modrinth/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "modrinth.spec" + } +} \ No newline at end of file diff --git a/anda/games/modrinth/modrinth.spec b/anda/games/modrinth/modrinth.spec new file mode 100644 index 0000000000..27db884916 --- /dev/null +++ b/anda/games/modrinth/modrinth.spec @@ -0,0 +1,37 @@ +Name: modrinth +Version: 1.2.3 +Release: 1%?dist +Summary: Desktop app for managing mods and modpacks from Modrinth +URL: https://github.com/modrinth/code +License: GPL-3.0-or-later +BuildRequires: git-core rust tauri +Packager: Willow Reed + +%description +Desktop app for managing mods and modpacks from Modrinth + +%prep +rm -rf ./* +git clone --recursive %{url} . +git checkout v%{version} + +%build +# Vendor PNPM directly instead of installing from packages, because we need to somehow force PNPM to use Node.js 20 +# We are not using Fedora's PNPM because we need to use `pnpm env`, which PNPM does not support when not vendored directly from upstream +curl -fsSL https://get.pnpm.io/install.sh | sh - +source /builddir/.bashrc +pnpm env use --global 20 +pnpm install +pnpm build +pnpm electron-builder --linux --dir + +%install +echo "this will also run when building pkg but for installing it into %{buildroot} so that anda (mock) can package it" + +%files +/usr/bin/pkgname-binary +/path/to/more/files/*/package + +%changelog +* Wed Jan 11 2006 your-username-here +- Description on what you've done \ No newline at end of file diff --git a/anda/games/modrinth/update.rhai b/anda/games/modrinth/update.rhai new file mode 100644 index 0000000000..de5fa1d7f4 --- /dev/null +++ b/anda/games/modrinth/update.rhai @@ -0,0 +1 @@ +rpm.version(find(`https://launcher-files.modrinth.com/versions/([/d/.]+)/linux/Modrinth%20App_.+?_amd64.AppImage`, get("https://modrinth.com/app"), 1)); \ No newline at end of file