Skip to content

Commit

Permalink
games-util/modrinth-app-bin: new package, add 0.9.2
Browse files Browse the repository at this point in the history
Signed-off-by: Norbert Norbiros <norbiros@protonmail.com>
  • Loading branch information
Norbiros committed Jan 18, 2025
1 parent 16f2c76 commit 3f6de06
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 0 deletions.
1 change: 1 addition & 0 deletions games-util/modrinth-app-bin/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST Modrinth%20App_0.9.2_amd64.deb 8162736 BLAKE2B 0e5bc56252e2598d5f57e601e7e90cb36d11232d6e78d1271184e0440029241b3ab4945ec83091e64bc31531bd2aedeb096d912cd3c4303e7d58374ec9917c80 SHA512 40445540e071675af23384e55892b659f66da3d9400d8f7d624de2cf9424227dea4ce821a2b843a23d37238908d864ba005668d5a00175a11f30409b384995c2
15 changes: 15 additions & 0 deletions games-util/modrinth-app-bin/files/modrinth-app-bin-desktop.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/usr/share/applications/modrinth-app-bin.desktop b/usr/share/applications/modrinth-app-bi.desktop
index 802f685..898b247 100644
--- a/usr/share/applications/modrinth-app-bin.desktop
+++ b/usr/share/applications/modrinth-app-bin.desktop
@@ -1,8 +1,8 @@
[Desktop Entry]
Categories=Game;
-Exec=ModrinthApp
+Exec="/opt/modrinth-app-bin/modrinth-app-bin" %U
Icon=ModrinthApp
Name=Modrinth App
Terminal=false
Type=Application
MimeType=application/zip+mrpack;x-scheme-handler/modrinth

11 changes: 11 additions & 0 deletions games-util/modrinth-app-bin/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>norbiros@protonmail.com</email>
<name>Norbiros</name>
</maintainer>
<upstream>
<remote-id type="github">Modrinth/code</remote-id>
</upstream>
</pkgmetadata>
78 changes: 78 additions & 0 deletions games-util/modrinth-app-bin/modrinth-app-bin-0.9.2.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit unpacker desktop xdg-utils

DESCRIPTION="A unique, open source launcher that allows you to play your favorite Minecraft mods, and keep them up to date, all in one neat little package."
HOMEPAGE="https://modrinth.com/app"
SRC_URI="https://launcher-files.modrinth.com/versions/${PV}/linux/Modrinth%20App_${PV}_amd64.deb"

S="${WORKDIR}"

LICENSE="GPL-3.0-only"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""

# Tauri deps
RDEPEND="
sys-apps/dbus
net-libs/webkit-gtk:4.1
dev-libs/libappindicator
x11-libs/gtk+:3
net-libs/libsoup
gnome-base/librsvg
"
# Minecraft deps
RDEPEND+="
x11-libs/libX11
media-libs/libpulse
x11-libs/libXxf86vm
"
BDEPEND="app-arch/unzip"

QA_PREBUILT=".*"

PATCHES=(
"${FILESDIR}/${PN}-desktop.patch"
)

src_unpack() {
unpack_deb ${A}
}

src_prepare() {
mv "${S}/usr/share/applications/Modrinth App.desktop"\
"${S}/usr/share/applications/${PN}.desktop"

default

mv "${S}/usr/bin/ModrinthApp" "${S}/usr/bin/${PN}" || die
}

src_install() {
ICONDIR="usr/share/icons/hicolor"
DESTDIR="/opt/${PN}"

doicon -s 128 "${ICONDIR}/128x128/apps/ModrinthApp.png"
doicon -s 256 "${ICONDIR}/256x256@2/apps/ModrinthApp.png"

domenu "${S}/usr/share/applications/${PN}.desktop"

dodir /opt/${PN}

exeinto "${DESTDIR}"
doexe "${S}/usr/bin/${PN}"
}

pkg_postinst() {
xdg_icon_cache_update
xdg_desktop_database_update
}

pkg_postrm() {
xdg_icon_cache_update
xdg_desktop_database_update
}

0 comments on commit 3f6de06

Please sign in to comment.