From 42bab0ced5761707ef9fb1413374b453fcf5d9fc Mon Sep 17 00:00:00 2001 From: madomado Date: Wed, 15 Feb 2023 08:13:37 +0800 Subject: [PATCH] add: osu-lazer osu-mime (#195) Squashed commit of the following: commit b0b62ae308197bd6cbab832a5e915a8ea152ecd5 Merge: c8c13b7 fcb92e1 Author: windowsboy111 Date: Mon Feb 13 17:25:16 2023 +0800 Merge branch 'main' into osu-lazer commit c8c13b724749ff560727fb02912f1ca701e26f29 Author: windowsboy111 Date: Mon Feb 13 17:22:19 2023 +0800 lint: osu-lazer Signed-off-by: windowsboy111 commit 5aac8e807add521785515762f15e2c8803a0c20b Author: windowsboy111 Date: Mon Feb 13 17:21:25 2023 +0800 lint: osu-mime Signed-off-by: windowsboy111 commit a1b44acfb29414174c56d7e11f5bf275d080f4c5 Author: windowsboy111 Date: Mon Feb 13 17:20:00 2023 +0800 fix(update): sccache Signed-off-by: windowsboy111 commit bab4b5fd7821cc2c68d27ae5b202e26e4dfebc23 Author: windowsboy111 Date: Mon Feb 13 17:19:07 2023 +0800 fix(version): sccache Signed-off-by: windowsboy111 commit af588816cb86e4e9ee0fbee6d962f626c7fc1d36 Merge: 331e404 4a3e45a Author: madomado <119111128+madonuko@users.noreply.github.com> Date: Mon Feb 13 09:46:21 2023 +0800 Merge branch 'main' into osu-lazer commit 331e4042400ebcbdea7ccdf8993121bb9ed7f1e7 Author: madomado <119111128+madonuko@users.noreply.github.com> Date: Mon Feb 13 01:45:50 2023 +0000 Fix commit f4754915937e99e8cd1612912210a8df380b4120 Author: madomado <119111128+madonuko@users.noreply.github.com> Date: Mon Feb 13 01:29:51 2023 +0000 update momento commit ea4a70fdf2c328de1e5753b03f173228d8f5e8de Author: madomado <119111128+madonuko@users.noreply.github.com> Date: Mon Feb 13 01:27:24 2023 +0000 forgot to add anda.hcl commit 4d3284970f139206125516dd14dba97207d0b328 Author: madomado <119111128+madonuko@users.noreply.github.com> Date: Mon Feb 13 01:22:20 2023 +0000 add: osu-lazer commit cf891b2c35cd14fc4f4b3a33519d70ac6a120c09 Author: madomado <119111128+madonuko@users.noreply.github.com> Date: Mon Feb 13 01:22:02 2023 +0000 add: osu-mime --- anda/games/osu-lazer/anda.hcl | 5 ++ .../osu-lazer/osu-lazer-uri-handler.desktop | 9 +++ anda/games/osu-lazer/osu-lazer.desktop | 8 +++ anda/games/osu-lazer/osu-lazer.spec | 51 ++++++++++++++++ anda/games/osu-lazer/update.rhai | 2 + anda/games/osu-mime/anda.hcl | 5 ++ anda/games/osu-mime/osu-file-extensions.xml | 42 +++++++++++++ anda/games/osu-mime/osu-mime.spec | 60 +++++++++++++++++++ anda/rust/sccache/rust-sccache.spec | 2 +- anda/rust/sccache/update.rhai | 2 +- 10 files changed, 184 insertions(+), 2 deletions(-) create mode 100644 anda/games/osu-lazer/anda.hcl create mode 100644 anda/games/osu-lazer/osu-lazer-uri-handler.desktop create mode 100644 anda/games/osu-lazer/osu-lazer.desktop create mode 100644 anda/games/osu-lazer/osu-lazer.spec create mode 100644 anda/games/osu-lazer/update.rhai create mode 100644 anda/games/osu-mime/anda.hcl create mode 100644 anda/games/osu-mime/osu-file-extensions.xml create mode 100644 anda/games/osu-mime/osu-mime.spec diff --git a/anda/games/osu-lazer/anda.hcl b/anda/games/osu-lazer/anda.hcl new file mode 100644 index 0000000000..c4fe8c31ca --- /dev/null +++ b/anda/games/osu-lazer/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "osu-lazer.spec" + } +} \ No newline at end of file diff --git a/anda/games/osu-lazer/osu-lazer-uri-handler.desktop b/anda/games/osu-lazer/osu-lazer-uri-handler.desktop new file mode 100644 index 0000000000..97492edf61 --- /dev/null +++ b/anda/games/osu-lazer/osu-lazer-uri-handler.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Application +NoDisplay=true +Name=osu!lazer - uri handler +MimeType=x-scheme-handler/osu; +Icon=/usr/share/pixmaps/osu-lazer.png +Comment=Open source free-to-win rhythm game +Exec=/usr/bin/osu-lazer %u +Categories=Game; \ No newline at end of file diff --git a/anda/games/osu-lazer/osu-lazer.desktop b/anda/games/osu-lazer/osu-lazer.desktop new file mode 100644 index 0000000000..2376814087 --- /dev/null +++ b/anda/games/osu-lazer/osu-lazer.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Name=osu!lazer +MimeType=application/x-osu-skin-archive;application/x-osu-replay;application/x-osu-beatmap-archive; +Icon=/usr/share/pixmaps/osu-lazer.png +Comment=Open source free-to-win rhythm game +Exec=/usr/bin/osu-lazer +Categories=Game; \ No newline at end of file diff --git a/anda/games/osu-lazer/osu-lazer.spec b/anda/games/osu-lazer/osu-lazer.spec new file mode 100644 index 0000000000..ee3d4d82c7 --- /dev/null +++ b/anda/games/osu-lazer/osu-lazer.spec @@ -0,0 +1,51 @@ +%define osuresver 2023.202.0 +%global debug_package %{nil} + +Name: osu-lazer +Version: 2023.207.0 +Release: 1%{?dist} +Summary: The future of osu! and the beginning of an open era! Commonly known by the codename osu!lazer. Pew pew. +ExclusiveArch: x86_64 +URL: https://osu.ppy.sh/ +License: MIT, CC-BY-NC-4.0 +Requires: zlib osu-mime fuse +Source0: https://github.com/ppy/osu/releases/download/%{version}/osu.AppImage +Source1: https://raw.githubusercontent.com/ppy/osu/%{version}/assets/lazer.png +Source2: https://raw.githubusercontent.com/ppy/osu-resources/%{osuresver}/LICENCE.md +Source3: osu-lazer.desktop +Source4: osu-lazer-uri-handler.desktop + +%description +%{summary} + +%prep +cat < osu-lazer +#!/bin/sh +env OSU_EXTERNAL_UPDATE_PROVIDER=1 /opt/osu-lazer/osu.AppImage "$@" +EOF + + +%build + +%install +install -Dm755 %{SOURCE0} %{buildroot}/opt/osu-lazer/osu.AppImage +install -Dm755 -t %{buildroot}/usr/bin osu-lazer + +# Install pixmap, desktop and license file +mkdir -p %{buildroot}/%{_datadir}/licenses/%{name}/ +install -Dm644 %{SOURCE1} %{buildroot}/usr/share/pixmaps/osu-lazer.png +install -Dm644 %{SOURCE2} %{buildroot}/%{_datadir}/licenses/%{name}/LICENSE.md +install -Dm644 -t %{buildroot}/usr/share/applications %{SOURCE3} +install -Dm644 -t %{buildroot}/usr/share/applications %{SOURCE4} + +%files +%license LICENSE.md +/usr/share/applications/osu-lazer*.desktop +/usr/bin/osu-lazer +/opt/osu-lazer/osu.AppImage +/usr/share/pixmaps/osu-lazer.png + + +%changelog +* Mon Feb 13 2023 windowsboy111 +- Initial package diff --git a/anda/games/osu-lazer/update.rhai b/anda/games/osu-lazer/update.rhai new file mode 100644 index 0000000000..23f35b7e37 --- /dev/null +++ b/anda/games/osu-lazer/update.rhai @@ -0,0 +1,2 @@ +rpm.version(gh("ppy/osu")); +rpm.define("osuresver", gh("ppy/osu-resources")); \ No newline at end of file diff --git a/anda/games/osu-mime/anda.hcl b/anda/games/osu-mime/anda.hcl new file mode 100644 index 0000000000..f88c5b61e6 --- /dev/null +++ b/anda/games/osu-mime/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "osu-mime.spec" + } +} \ No newline at end of file diff --git a/anda/games/osu-mime/osu-file-extensions.xml b/anda/games/osu-mime/osu-file-extensions.xml new file mode 100644 index 0000000000..4dd2a3752a --- /dev/null +++ b/anda/games/osu-mime/osu-file-extensions.xml @@ -0,0 +1,42 @@ + + + + + + + + + + osu! beatmap + + + + + + osu! storyboard + + + + + + osu! skin archive + + + + + + osu! replay + + + + + + osu! beatmap archive + + + + + + osu! beatmap archive + + \ No newline at end of file diff --git a/anda/games/osu-mime/osu-mime.spec b/anda/games/osu-mime/osu-mime.spec new file mode 100644 index 0000000000..423c2c5c94 --- /dev/null +++ b/anda/games/osu-mime/osu-mime.spec @@ -0,0 +1,60 @@ +Name: osu-mime +Version: 0.1 +Release: 1%{?dist} +Summary: Provides MIME types for osu! file formats +BuildArch: noarch +License: AGPLv3 +Requires: xdg-utils shared-mime-info desktop-file-utils +BuildRequires: librsvg2-tools ImageMagick +Recommends: osu-handler +Source0: https://raw.githubusercontent.com/ppy/osu-web/master/public/images/layout/osu-logo-triangles.svg +Source1: https://raw.githubusercontent.com/ppy/osu-web/master/public/images/layout/osu-logo-white.svg +Source2: osu-file-extensions.xml + +%description +%{summary}. + +%prep + +%build +mkdir -p 'icons/hicolor' +for size in 16 24 32 48 64 96 128 192 256 384 512 1024; do + mkdir -p "icons/hicolor/${size}x${size}/apps" + cd "icons/hicolor/${size}x${size}/apps" + + rsvg-convert -w "$size" -h "$size" -f png -o "osu!.png.1" %{SOURCE0} + rsvg-convert -w "$size" -h "$size" -f png -o "osu!.png.2" %{SOURCE1} + convert -composite 'osu!.png.1' 'osu!.png.2' -gravity center 'osu!.png' + rm 'osu!.png.1' 'osu!.png.2' + + cd ../../../.. +done + +%install +mkdir -p %{buildroot}/usr/share +cp -r --no-preserve=ownership icons %{buildroot}/usr/share/icons +install -D -m644 %{SOURCE2} %{buildroot}/usr/share/mime/packages/osu-file-extensions.xml + +%post +xdg-icon-resource forceupdate --theme hicolor &>/dev/null +update-mime-database usr/share/mime &>/dev/null +update-desktop-database -q + +%postun +xdg-icon-resource forceupdate --theme hicolor &>/dev/null +update-mime-database usr/share/mime &>/dev/null +update-desktop-database -q + +%posttrans +xdg-icon-resource forceupdate --theme hicolor &>/dev/null +update-mime-database usr/share/mime &>/dev/null +update-desktop-database -q + + +%files +/usr/share/icons/hicolor/*/apps/osu!.png +/usr/share/mime/packages/osu-file-extensions.xml + +%changelog +* Mon Feb 13 2023 windowsboy111 +- Initial package diff --git a/anda/rust/sccache/rust-sccache.spec b/anda/rust/sccache/rust-sccache.spec index b75e6501b3..97a39e7020 100644 --- a/anda/rust/sccache/rust-sccache.spec +++ b/anda/rust/sccache/rust-sccache.spec @@ -6,7 +6,7 @@ %global crate sccache Name: rust-sccache -Version: 0.4.0-pre.7 +Version: 0.3.3 Release: 1%{?dist} Summary: Ccache-like tool diff --git a/anda/rust/sccache/update.rhai b/anda/rust/sccache/update.rhai index 4a50e54657..1ed151b2ae 100644 --- a/anda/rust/sccache/update.rhai +++ b/anda/rust/sccache/update.rhai @@ -1 +1 @@ -rpm.version(gh("mozilla/sccache")); +rpm.version(crates("mozilla/sccache"));