Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/discord-bin/
Date: Thu, 26 May 2022 12:58:17
Message-Id: 1653569884.87146e74a4ebe0339ad3a2e0a0bc47d9e8ced6d6.juippis@gentoo
1 commit: 87146e74a4ebe0339ad3a2e0a0bc47d9e8ced6d6
2 Author: Randall T. Vasquez <ran.dall <AT> icloud <DOT> com>
3 AuthorDate: Thu May 19 17:29:11 2022 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Thu May 26 12:58:04 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87146e74
7
8 net-im/discord-bin: add maintainer, tidy ebuild
9
10 This commit also adds additional trivial comments and fixes.
11
12 Signed-off-by: Randall T. Vasquez <ran.dall <AT> icloud.com>
13 Closes: https://github.com/gentoo/gentoo/pull/25559
14 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
15
16 net-im/discord-bin/discord-bin-0.0.17-r1.ebuild | 39 ++++++++++++-------------
17 net-im/discord-bin/metadata.xml | 9 +++++-
18 2 files changed, 26 insertions(+), 22 deletions(-)
19
20 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
21 index c79e83117a24..7002ec21bc3b 100644
22 --- a/net-im/discord-bin/discord-bin-0.0.17-r1.ebuild
23 +++ b/net-im/discord-bin/discord-bin-0.0.17-r1.ebuild
24 @@ -5,7 +5,6 @@ EAPI=8
25
26 MY_PN="${PN/-bin}"
27 MY_PV="${PV/-r*}"
28 -MY_BIN="${MY_PN^}"
29
30 CHROMIUM_LANGS="
31 am ar bg bn ca cs da de el en-GB en-US es es-419 et fa fi fil fr gu he hi
32 @@ -13,7 +12,7 @@ CHROMIUM_LANGS="
33 sw ta te th tr uk vi zh-CN zh-TW
34 "
35
36 -inherit chromium-2 desktop linux-info optfeature pax-utils unpacker xdg
37 +inherit chromium-2 desktop linux-info optfeature unpacker xdg
38
39 DESCRIPTION="All-in-one voice and text chat for gamers"
40 HOMEPAGE="https://discordapp.com"
41 @@ -56,10 +55,10 @@ RDEPEND="
42
43 RESTRICT="bindist mirror strip test"
44
45 -DESTDIR="/opt/${MY_BIN}"
46 +DESTDIR="/opt/${MY_PN}"
47
48 QA_PREBUILT="
49 - ${DESTDIR#/}/${MY_BIN}
50 + ${DESTDIR#/}/${MY_PN}
51 ${DESTDIR#/}/chrome-sandbox
52 ${DESTDIR#/}/libffmpeg.so
53 ${DESTDIR#/}/libvk_swiftshader.so
54 @@ -74,14 +73,14 @@ QA_PREBUILT="
55
56 CONFIG_CHECK="~USER_NS"
57
58 -S="${WORKDIR}/${MY_BIN}"
59 +S="${WORKDIR}/${MY_PN^}"
60
61 pkg_pretend() {
62 chromium_suid_sandbox_check_kernel_config
63 }
64
65 src_unpack() {
66 - unpack ${MY_PN}-${MY_PV}.tar.gz || die
67 + unpack ${MY_PN}-${MY_PV}.tar.gz
68 }
69
70 src_configure() {
71 @@ -92,37 +91,35 @@ src_configure() {
72
73 src_prepare() {
74 default
75 -
76 - rm postinst.sh
77 -
78 - pushd "locales/" || die
79 + # remove post-install script
80 + rm postinst.sh || die "the removal of the unneeded post-install script failed"
81 + # cleanup languages
82 + pushd "locales/" || die "location change for language cleanup failed"
83 chromium_remove_language_paks
84 - popd || die
85 -
86 - sed -i -e "s:/usr/share/discord/Discord:${DESTDIR}/${MY_BIN}:" ${MY_PN}.desktop || die
87 + popd || die "location reset for language cleanup failed"
88 + # fix .desktop exec location
89 + sed -i -e "s:/usr/share/discord/Discord:${DESTDIR}/${MY_PN^}:" ${MY_PN}.desktop || die "fixing of exec location on .desktop failed"
90 }
91
92 src_install() {
93 doicon -s 256 ${MY_PN}.png
94
95 - # Install desktop file
96 + # install .desktop file
97 domenu ${MY_PN}.desktop
98
99 exeinto "${DESTDIR}"
100 - doexe ${MY_BIN} chrome-sandbox libEGL.so libffmpeg.so libGLESv2.so libvk_swiftshader.so
101 + doexe ${MY_PN^} chrome-sandbox libEGL.so libffmpeg.so libGLESv2.so libvk_swiftshader.so
102
103 insinto "${DESTDIR}"
104 doins chrome_100_percent.pak chrome_200_percent.pak icudtl.dat resources.pak snapshot_blob.bin v8_context_snapshot.bin
105 insopts -m0755
106 doins -r locales resources swiftshader
107
108 - # chrome-sandbox requires the setuid bit to be specifically set.
109 - # See https://github.com/electron/electron/issues/17972
110 - fperms 4755 "${DESTDIR}"/chrome-sandbox || die
111 -
112 - pax-mark m "${DESTDIR}"/${MY_BIN} || die "could not set proper PAX permissions"
113 + # Chrome-sandbox requires the setuid bit to be specifically set.
114 + # see https://github.com/electron/electron/issues/17972
115 + fperms 4755 "${DESTDIR}"/chrome-sandbox
116
117 - dosym "${DESTDIR}"/${MY_BIN} /usr/bin/${MY_PN} || die
118 + dosym "${DESTDIR}"/${MY_PN^} /usr/bin/${MY_PN}
119 }
120
121 pkg_postinst() {
122
123 diff --git a/net-im/discord-bin/metadata.xml b/net-im/discord-bin/metadata.xml
124 index 115e9d64a669..f485c452f77f 100644
125 --- a/net-im/discord-bin/metadata.xml
126 +++ b/net-im/discord-bin/metadata.xml
127 @@ -1,5 +1,12 @@
128 <?xml version="1.0" encoding="UTF-8"?>
129 <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
130 <pkgmetadata>
131 - <!-- maintainer-needed -->
132 + <maintainer type="person" proxied="yes">
133 + <email>ran.dall@××××××.com</email>
134 + <name>Randall T. Vasquez</name>
135 + </maintainer>
136 + <maintainer type="project" proxied="proxy">
137 + <email>proxy-maint@g.o</email>
138 + <name>Proxy Maintainers</name>
139 + </maintainer>
140 </pkgmetadata>