summaryrefslogtreecommitdiff
path: root/net-im
diff options
context:
space:
mode:
authorRandall T. Vasquez <ran.dall@icloud.com>2022-05-19 10:29:11 -0700
committerJoonas Niilola <juippis@gentoo.org>2022-05-26 15:58:04 +0300
commit87146e74a4ebe0339ad3a2e0a0bc47d9e8ced6d6 (patch)
treeaa067d19f10ed7cc0f9632c453a6236bb117b9dd /net-im
parentapp-mobilephone/heimdall: add udev_reload in pkg_postinst (diff)
downloadgentoo-87146e74a4ebe0339ad3a2e0a0bc47d9e8ced6d6.tar.gz
gentoo-87146e74a4ebe0339ad3a2e0a0bc47d9e8ced6d6.tar.bz2
gentoo-87146e74a4ebe0339ad3a2e0a0bc47d9e8ced6d6.zip
net-im/discord-bin: add maintainer, tidy ebuild
This commit also adds additional trivial comments and fixes. Signed-off-by: Randall T. Vasquez <ran.dall@icloud.com> Closes: https://github.com/gentoo/gentoo/pull/25559 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'net-im')
-rw-r--r--net-im/discord-bin/discord-bin-0.0.17-r1.ebuild39
-rw-r--r--net-im/discord-bin/metadata.xml9
2 files changed, 26 insertions, 22 deletions
diff --git a/net-im/discord-bin/discord-bin-0.0.17-r1.ebuild b/net-im/discord-bin/discord-bin-0.0.17-r1.ebuild
index c79e83117a24..7002ec21bc3b 100644
--- a/net-im/discord-bin/discord-bin-0.0.17-r1.ebuild
+++ b/net-im/discord-bin/discord-bin-0.0.17-r1.ebuild
@@ -5,7 +5,6 @@ EAPI=8
MY_PN="${PN/-bin}"
MY_PV="${PV/-r*}"
-MY_BIN="${MY_PN^}"
CHROMIUM_LANGS="
am ar bg bn ca cs da de el en-GB en-US es es-419 et fa fi fil fr gu he hi
@@ -13,7 +12,7 @@ CHROMIUM_LANGS="
sw ta te th tr uk vi zh-CN zh-TW
"
-inherit chromium-2 desktop linux-info optfeature pax-utils unpacker xdg
+inherit chromium-2 desktop linux-info optfeature unpacker xdg
DESCRIPTION="All-in-one voice and text chat for gamers"
HOMEPAGE="https://discordapp.com"
@@ -56,10 +55,10 @@ RDEPEND="
RESTRICT="bindist mirror strip test"
-DESTDIR="/opt/${MY_BIN}"
+DESTDIR="/opt/${MY_PN}"
QA_PREBUILT="
- ${DESTDIR#/}/${MY_BIN}
+ ${DESTDIR#/}/${MY_PN}
${DESTDIR#/}/chrome-sandbox
${DESTDIR#/}/libffmpeg.so
${DESTDIR#/}/libvk_swiftshader.so
@@ -74,14 +73,14 @@ QA_PREBUILT="
CONFIG_CHECK="~USER_NS"
-S="${WORKDIR}/${MY_BIN}"
+S="${WORKDIR}/${MY_PN^}"
pkg_pretend() {
chromium_suid_sandbox_check_kernel_config
}
src_unpack() {
- unpack ${MY_PN}-${MY_PV}.tar.gz || die
+ unpack ${MY_PN}-${MY_PV}.tar.gz
}
src_configure() {
@@ -92,37 +91,35 @@ src_configure() {
src_prepare() {
default
-
- rm postinst.sh
-
- pushd "locales/" || die
+ # remove post-install script
+ rm postinst.sh || die "the removal of the unneeded post-install script failed"
+ # cleanup languages
+ pushd "locales/" || die "location change for language cleanup failed"
chromium_remove_language_paks
- popd || die
-
- sed -i -e "s:/usr/share/discord/Discord:${DESTDIR}/${MY_BIN}:" ${MY_PN}.desktop || die
+ popd || die "location reset for language cleanup failed"
+ # fix .desktop exec location
+ sed -i -e "s:/usr/share/discord/Discord:${DESTDIR}/${MY_PN^}:" ${MY_PN}.desktop || die "fixing of exec location on .desktop failed"
}
src_install() {
doicon -s 256 ${MY_PN}.png
- # Install desktop file
+ # install .desktop file
domenu ${MY_PN}.desktop
exeinto "${DESTDIR}"
- doexe ${MY_BIN} chrome-sandbox libEGL.so libffmpeg.so libGLESv2.so libvk_swiftshader.so
+ doexe ${MY_PN^} chrome-sandbox libEGL.so libffmpeg.so libGLESv2.so libvk_swiftshader.so
insinto "${DESTDIR}"
doins chrome_100_percent.pak chrome_200_percent.pak icudtl.dat resources.pak snapshot_blob.bin v8_context_snapshot.bin
insopts -m0755
doins -r locales resources swiftshader
- # chrome-sandbox requires the setuid bit to be specifically set.
- # See https://github.com/electron/electron/issues/17972
- fperms 4755 "${DESTDIR}"/chrome-sandbox || die
-
- pax-mark m "${DESTDIR}"/${MY_BIN} || die "could not set proper PAX permissions"
+ # Chrome-sandbox requires the setuid bit to be specifically set.
+ # see https://github.com/electron/electron/issues/17972
+ fperms 4755 "${DESTDIR}"/chrome-sandbox
- dosym "${DESTDIR}"/${MY_BIN} /usr/bin/${MY_PN} || die
+ dosym "${DESTDIR}"/${MY_PN^} /usr/bin/${MY_PN}
}
pkg_postinst() {
diff --git a/net-im/discord-bin/metadata.xml b/net-im/discord-bin/metadata.xml
index 115e9d64a669..f485c452f77f 100644
--- a/net-im/discord-bin/metadata.xml
+++ b/net-im/discord-bin/metadata.xml
@@ -1,5 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person" proxied="yes">
+ <email>ran.dall@icloud.com</email>
+ <name>Randall T. Vasquez</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
</pkgmetadata>