1 |
commit: 0fd290cc81eab1146dfd80f9798a576674d54c2d |
2 |
Author: Gino <onigino <AT> protonmail <DOT> com> |
3 |
AuthorDate: Sun Sep 9 21:54:17 2018 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 19 05:08:30 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fd290cc |
7 |
|
8 |
net-im/discord-bin: rewrite ebuild |
9 |
|
10 |
This rewrite offers better handling of electron files installed into |
11 |
/opt |
12 |
|
13 |
Closes: https://bugs.gentoo.org/660870 |
14 |
Closes: https://github.com/gentoo/gentoo/pull/9815 |
15 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
16 |
|
17 |
...in-0.0.5.ebuild => discord-bin-0.0.5-r1.ebuild} | 35 +++++++++++----------- |
18 |
1 file changed, 17 insertions(+), 18 deletions(-) |
19 |
|
20 |
diff --git a/net-im/discord-bin/discord-bin-0.0.5.ebuild b/net-im/discord-bin/discord-bin-0.0.5-r1.ebuild |
21 |
similarity index 64% |
22 |
rename from net-im/discord-bin/discord-bin-0.0.5.ebuild |
23 |
rename to net-im/discord-bin/discord-bin-0.0.5-r1.ebuild |
24 |
index aebe7f5fee1..4f5af1205dc 100644 |
25 |
--- a/net-im/discord-bin/discord-bin-0.0.5.ebuild |
26 |
+++ b/net-im/discord-bin/discord-bin-0.0.5-r1.ebuild |
27 |
@@ -1,10 +1,11 @@ |
28 |
-# Copyright 1999-2018 Gentoo Foundation |
29 |
+# Copyright 1999-2018 Gentoo Authors |
30 |
# Distributed under the terms of the GNU General Public License v2 |
31 |
|
32 |
EAPI=6 |
33 |
|
34 |
MY_PN=${PN/-bin/} |
35 |
-inherit eutils gnome2-utils unpacker |
36 |
+MY_BIN="D${MY_PN/d/}" |
37 |
+inherit eutils gnome2-utils unpacker desktop xdg-utils |
38 |
|
39 |
DESCRIPTION="All-in-one voice and text chat for gamers" |
40 |
HOMEPAGE="https://discordapp.com" |
41 |
@@ -50,9 +51,9 @@ S=${WORKDIR} |
42 |
RESTRICT="mirror bindist" |
43 |
|
44 |
QA_PREBUILT=" |
45 |
- opt/discord/share/discord/Discord |
46 |
- opt/discord/share/discord/libnode.so |
47 |
- opt/discord/share/discord/libffmpeg.so |
48 |
+ opt/discord/${MY_BIN} |
49 |
+ opt/discord/libnode.so |
50 |
+ opt/discord/libffmpeg.so |
51 |
" |
52 |
|
53 |
src_unpack() { |
54 |
@@ -63,30 +64,28 @@ src_prepare() { |
55 |
default |
56 |
|
57 |
sed -i \ |
58 |
- -e "s:/usr/share/discord/Discord:discord:g" \ |
59 |
+ -e "s:/usr/share/discord/Discord:/opt/${MY_PN}/${MY_BIN}:g" \ |
60 |
usr/share/${MY_PN}/${MY_PN}.desktop || die |
61 |
} |
62 |
|
63 |
src_install() { |
64 |
- insinto /opt/${MY_PN} |
65 |
- doins -r usr/. |
66 |
+ domenu opt/${MY_PN}/${MY_PN}.desktop |
67 |
+ doicon opt/${MY_PN}/${MY_PN}.png |
68 |
|
69 |
- fperms +x /opt/${MY_PN}/bin/${MY_PN} |
70 |
- dosym ../../opt/${MY_PN}/bin/${MY_PN} /usr/bin/${MY_PN} |
71 |
- dosym ../../../opt/${MY_PN}/share/applications/${MY_PN}.desktop \ |
72 |
- /usr/share/applications/${MY_PN}.desktop |
73 |
- dosym ../../../opt/${MY_PN}/share/pixmaps/${MY_PN}.png \ |
74 |
- /usr/share/pixmaps/${MY_PN}.png |
75 |
-} |
76 |
- |
77 |
-pkg_preinst() { |
78 |
- gnome2_icon_savelist |
79 |
+ insinto /opt |
80 |
+ doins -r usr/share/${MY_PN} |
81 |
+ fperms +x /opt/${MY_PN}/${MY_BIN} |
82 |
+ dosym ../../opt/${MY_PN}/${MY_BIN} usr/bin/${MY_PN} |
83 |
} |
84 |
|
85 |
pkg_postinst() { |
86 |
+ xdg_desktop_database_update |
87 |
+ xdg_mimeinfo_database_update |
88 |
gnome2_icon_cache_update |
89 |
} |
90 |
|
91 |
pkg_postrm() { |
92 |
+ xdg_desktop_database_update |
93 |
+ xdg_mimeinfo_database_update |
94 |
gnome2_icon_cache_update |
95 |
} |