Gentoo Archives: gentoo-commits

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