media-sound/pocket-casts: Use desktop.eclass to add icon and desktop entry

Signed-off-by: Sravan Balaji <balajsra@umich.edu>
This commit is contained in:
Sravan Balaji
2025-05-06 17:25:24 -04:00
parent e5e87b7ee4
commit db76be9c6c
2 changed files with 13 additions and 18 deletions

View File

@@ -1,7 +0,0 @@
[Desktop Entry]
Type=Application
Name=Pocket Casts
Icon=pocket-casts
Exec=pocket-casts
Terminal=false
Categories=Audio;Player;AudioVideo

View File

@@ -1,15 +1,19 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop
DESCRIPTION="Electron wrapper around the Pocket Casts web app with support for MPRIS (media controls)"
HOMEPAGE="https://github.com/fuadsaud/pocket-casts-linux"
SRC_URI="
${HOMEPAGE}/releases/download/v${PV}/pocket-casts-linux-${PV}-x86_64.AppImage -> ${P}.AppImage
${HOMEPAGE}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
https://github.com/fuadsaud/pocket-casts-linux/releases/download/v${PV}/pocket-casts-linux-${PV}-x86_64.AppImage -> ${P}.AppImage
https://github.com/fuadsaud/pocket-casts-linux/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
"
S="${WORKDIR}/pocket-casts-linux-${PV}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
@@ -19,19 +23,17 @@ RDEPEND="
sys-fs/fuse:0
"
S="${WORKDIR}/pocket-casts-linux-${PV}"
QA_PREBUILT="*"
src_install() {
# Binary
cp "${DISTDIR}/${P}.AppImage" pocket-casts || die
dobin pocket-casts
insinto /usr/share/applications
doins ${FILESDIR}/pocket-casts.desktop
# Icon
cd "${S}/resources/icon"
newicon --size scalable src.svg pocket-casts.svg
cd ${S}/resources/icon
insinto /usr/share/icons/hicolor/scalable/apps
cp src.svg pocket-casts.svg || die
doins pocket-casts.svg
# Desktop Entry
make_desktop_entry "pocket-casts" "Pocket Casts" "pocket-casts" "Audio;AudioVideo"
}