commit: 4570068cbf965d74747fb609d66057a02b88ba08 Author: Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com> AuthorDate: Fri Jul 7 21:26:03 2023 +0000 Commit: Haelwenn Monnier <contact <AT> hacktivis <DOT> me> CommitDate: Fri Jul 7 22:47:12 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4570068c
games-util/ProtonUp-Qt: remake ebuilds (now use python setuptools) Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail.com> games-util/ProtonUp-Qt/ProtonUp-Qt-2.8.1.ebuild | 30 +++++++++++++++++------- games-util/ProtonUp-Qt/ProtonUp-Qt-9999.ebuild | 27 ++++++++++++++------- games-util/ProtonUp-Qt/files/ProtonUp-Qt | 5 ++-- games-util/ProtonUp-Qt/files/ProtonUp-Qt.desktop | 2 +- 4 files changed, 45 insertions(+), 19 deletions(-) diff --git a/games-util/ProtonUp-Qt/ProtonUp-Qt-2.8.1.ebuild b/games-util/ProtonUp-Qt/ProtonUp-Qt-2.8.1.ebuild index 99c19bbfd..3d9579406 100644 --- a/games-util/ProtonUp-Qt/ProtonUp-Qt-2.8.1.ebuild +++ b/games-util/ProtonUp-Qt/ProtonUp-Qt-2.8.1.ebuild @@ -2,8 +2,15 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=8 +_app_id=net.davidotek.pupgui2 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..12} ) + +EPYTHON=python3 + +inherit distutils-r1 desktop -inherit desktop SRC_URI="https://github.com/DavidoTek/ProtonUp-Qt/archive/refs/tags/v${PV}.tar.gz" DESCRIPTION="Install and manage GE-Proton, Luxtorpeda & more for Steam and Wine-GE & more for Lutris with this graphical user interface." HOMEPAGE="https://davidotek.github.io/protonup-qt" @@ -19,16 +26,23 @@ DEPEND="dev-python/steam dev-python/pyxdg dev-python/pyaml dev-python/zstandard + dev-util/desktop-file-utils + dev-libs/appstream-glib " KEYWORDS="~amd64" -src_install() { - insinto /opt/ProtonUp-Qt && doins -r "${WORKDIR}/${P}/pupgui2" && doins -r "${WORKDIR}/${P}/pupgui2" - - insinto /opt/bin/ && doins "${FILESDIR}/ProtonUp-Qt" - fperms +x /opt/bin/ProtonUp-Qt +src_compile() { + appstream-util validate-relax --nonet "share/metainfo/$_app_id.appdata.xml" + desktop-file-validate "share/applications/$_app_id.desktop" + distutils-r1_src_compile +} +src_install() { + distutils-r1_src_install domenu "${FILESDIR}/ProtonUp-Qt.desktop" - newicon "${WORKDIR}/${P}/share/icons/hicolor/64x64/apps/net.davidotek.pupgui2.png" ProtonUp-Qt.png -} \ No newline at end of file + dobin "${FILESDIR}/ProtonUp-Qt" + newicon -s 64 "${WORKDIR}/${P}/share/icons/hicolor/64x64/apps/net.davidotek.pupgui2.png" ProtonUp-Qt.png + newicon -s 128 "${WORKDIR}/${P}/share/icons/hicolor/128x128/apps/net.davidotek.pupgui2.png" ProtonUp-Qt.png + newicon -s 256 "${WORKDIR}/${P}/share/icons/hicolor/256x256/apps/net.davidotek.pupgui2.png" ProtonUp-Qt.png +} diff --git a/games-util/ProtonUp-Qt/ProtonUp-Qt-9999.ebuild b/games-util/ProtonUp-Qt/ProtonUp-Qt-9999.ebuild index b4d5a4aa9..f25c104cc 100644 --- a/games-util/ProtonUp-Qt/ProtonUp-Qt-9999.ebuild +++ b/games-util/ProtonUp-Qt/ProtonUp-Qt-9999.ebuild @@ -2,8 +2,14 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=8 +_app_id=net.davidotek.pupgui2 -inherit git-r3 qmake-utils desktop +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..12} ) + +EPYTHON=python3 + +inherit git-r3 distutils-r1 desktop EGIT_REPO_URI="https://github.com/DavidoTek/ProtonUp-Qt.git" DESCRIPTION="Install and manage GE-Proton, Luxtorpeda & more for Steam and Wine-GE & more for Lutris with this graphical user interface." HOMEPAGE="https://davidotek.github.io/protonup-qt" @@ -21,12 +27,17 @@ DEPEND="dev-python/steam dev-python/zstandard " -src_install() { - insinto /opt/ProtonUp-Qt && doins -r "${WORKDIR}/${P}/pupgui2" && doins -r "${WORKDIR}/${P}/pupgui2" - - insinto /opt/bin/ && doins "${FILESDIR}/ProtonUp-Qt" - fperms +x /opt/bin/ProtonUp-Qt +src_compile() { + appstream-util validate-relax --nonet "share/metainfo/$_app_id.appdata.xml" + desktop-file-validate "share/applications/$_app_id.desktop" + distutils-r1_src_compile +} +src_install() { + distutils-r1_src_install domenu "${FILESDIR}/ProtonUp-Qt.desktop" - newicon "${WORKDIR}/${P}/share/icons/hicolor/64x64/apps/net.davidotek.pupgui2.png" ProtonUp-Qt.png -} \ No newline at end of file + dobin "${FILESDIR}/ProtonUp-Qt" + newicon -s 64 "${WORKDIR}/${P}/share/icons/hicolor/64x64/apps/net.davidotek.pupgui2.png" ProtonUp-Qt.png + newicon -s 128 "${WORKDIR}/${P}/share/icons/hicolor/128x128/apps/net.davidotek.pupgui2.png" ProtonUp-Qt.png + newicon -s 256 "${WORKDIR}/${P}/share/icons/hicolor/256x256/apps/net.davidotek.pupgui2.png" ProtonUp-Qt.png +} diff --git a/games-util/ProtonUp-Qt/files/ProtonUp-Qt b/games-util/ProtonUp-Qt/files/ProtonUp-Qt index 12a274a03..f2b298357 100644 --- a/games-util/ProtonUp-Qt/files/ProtonUp-Qt +++ b/games-util/ProtonUp-Qt/files/ProtonUp-Qt @@ -1,2 +1,3 @@ -#!/bin/sh -cd /opt/ProtonUp-Qt && python3 -m pupgui2 \ No newline at end of file +#!/bin/bash + +/usr/bin/python -m pupgui2 "$@" \ No newline at end of file diff --git a/games-util/ProtonUp-Qt/files/ProtonUp-Qt.desktop b/games-util/ProtonUp-Qt/files/ProtonUp-Qt.desktop index 6e23b5725..812107139 100644 --- a/games-util/ProtonUp-Qt/files/ProtonUp-Qt.desktop +++ b/games-util/ProtonUp-Qt/files/ProtonUp-Qt.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Name=ProtonUp-Qt -Exec=sh -c "cd /opt/ProtonUp-Qt && python3 -m pupgui2" +Exec=/usr/bin/ProtonUp-Qt Type=Application Comment=Install Wine and Proton-based Compatibility Tools Comment[de]=Wine und Proton Kompatibilitätstools installieren